{"id":21657727,"url":"https://github.com/bagaar/ember-breadcrumbs","last_synced_at":"2025-08-09T03:17:53.369Z","repository":{"id":33185946,"uuid":"153886409","full_name":"Bagaar/ember-breadcrumbs","owner":"Bagaar","description":"Template based breadcrumb management for Ember applications.","archived":false,"fork":false,"pushed_at":"2024-09-23T22:46:01.000Z","size":2503,"stargazers_count":16,"open_issues_count":4,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-25T18:40:15.189Z","etag":null,"topics":["breadcrumbs","ember-addon"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bagaar.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-20T08:43:35.000Z","updated_at":"2024-07-05T16:36:29.000Z","dependencies_parsed_at":"2024-06-21T16:34:48.988Z","dependency_job_id":"75e3dda9-3cb1-42b3-8db9-5e9d1dee2db0","html_url":"https://github.com/Bagaar/ember-breadcrumbs","commit_stats":{"total_commits":200,"total_committers":5,"mean_commits":40.0,"dds":"0.18999999999999995","last_synced_commit":"5dc5ea7a6be3475c14a1ac8d7181e06d7d73eb5c"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bagaar%2Fember-breadcrumbs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bagaar%2Fember-breadcrumbs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bagaar%2Fember-breadcrumbs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bagaar%2Fember-breadcrumbs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bagaar","download_url":"https://codeload.github.com/Bagaar/ember-breadcrumbs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248490158,"owners_count":21112695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["breadcrumbs","ember-addon"],"created_at":"2024-11-25T09:27:50.555Z","updated_at":"2025-04-11T22:33:26.208Z","avatar_url":"https://github.com/Bagaar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @bagaar/ember-breadcrumbs\n\n[![CI](https://github.com/bagaar/ember-breadcrumbs/workflows/CI/badge.svg)](https://github.com/bagaar/ember-breadcrumbs/actions?query=workflow%3ACI)\n[![NPM Version](https://badge.fury.io/js/%40bagaar%2Fember-breadcrumbs.svg)](https://badge.fury.io/js/%40bagaar%2Fember-breadcrumbs)\n\nTemplate based breadcrumb management for Ember applications.\n\n## Table of Contents\n\n- [Compatibility](#compatibility)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Usage Inside an Engine](#usage-inside-an-engine)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Compatibility\n\n- Ember.js v4.8 or above\n- Embroider or ember-auto-import v2\n\n## Installation\n\n```shell\nnpm install -D @bagaar/ember-breadcrumbs\n```\n\n```shell\npnpm add -D @bagaar/ember-breadcrumbs\n```\n\n```shell\nyarn add -D @bagaar/ember-breadcrumbs\n```\n\n## Usage\n\n### 1\\. Defining Where You Want the Breadcrumbs to Be Rendered\n\n```handlebars\n{{! app/templates/application.hbs }}\n\n\u003cBreadcrumbsContainer\n  @itemClass=\"breadcrumbs__item\"\n  @linkClass=\"breadcrumbs__link\"\n  class=\"breadcrumbs\"\n/\u003e\n```\n\n\u003e **NOTE:** It's also possible to render multiple instances of the `\u003cBreadcrumbsContainer /\u003e` component.\n\n### 2\\. Leaving Behind Breadcrumbs\n\n```handlebars\n{{! app/templates/foo.hbs }}\n\n\u003cBreadcrumbsItem as |linkClass|\u003e\n  \u003cLinkTo @route=\"foo\" class={{linkClass}}\u003e\n    Foo\n  \u003c/LinkTo\u003e\n\u003c/BreadcrumbsItem\u003e\n```\n\n```handlebars\n{{! app/templates/foo/bar.hbs }}\n\n\u003cBreadcrumbsItem as |linkClass|\u003e\n  \u003cLinkTo @route=\"foo.bar\" class={{linkClass}}\u003e\n    Bar\n  \u003c/LinkTo\u003e\n\u003c/BreadcrumbsItem\u003e\n```\n\n\u003e **NOTE:** The `\u003cBreadcrumbsItem /\u003e` component is responsible for rendering the provided `\u003cLinkTo /\u003e` component into all instances of the `\u003cBreadcrumbsContainer /\u003e` component using Ember's `{{in-element}}` helper.\n\n#### Advantages\n\nLeaving behind breadcrumbs like this might seem very verbose, but it's actually pretty flexible and has some advantages:\n\n1. Because you leave behind breadcrumbs inside templates, the addon doesn't have to take async model hooks into account\n2. Because you use Ember's `\u003cLinkTo /\u003e` component to define breadcrumb links, you have complete control over:\n   - **how you define them** (inline vs. block)\n   - **how they should work** (route, dynamic segments, query parameters, ...)\n   - **how they should look like** (text, icons, additional CSS class names, ...)\n\n#### Rendered Output\n\nThe rendered output will be:\n\n```html\n\u003cul class=\"breadcrumbs\"\u003e\n  \u003cli class=\"breadcrumbs__item\"\u003e\n    \u003ca class=\"breadcrumbs__link\" href=\"/foo\"\u003eFoo\u003c/a\u003e\n  \u003c/li\u003e\n  \u003cli class=\"breadcrumbs__item\"\u003e\n    \u003ca class=\"breadcrumbs__link\" href=\"/foo/bar\"\u003eBar\u003c/a\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n```\n\n### 3\\. Styling the Breadcrumbs\n\nThe addon doesn't ship with default styling, this should be done inside the consuming project.\n\n### 4\\. `\u003cBreadcrumbsContainer /\u003e` arguments\n\nName          | Description                                                                 | Type\n:-------------| :---------------------------------------------------------------------------| :-----\n**itemClass** | The class that will be added to all `\u003cBreadcrumbsItem /\u003e` components        | String\n**linkClass** | The class that will be yielded to the `\u003cBreadcrumbsItem /\u003e`'s block content | String\n\n## Usage Inside an Engine\n\n### 1\\. Add `@bagaar/ember-breadcrumbs` to Your Engine's `dependencies`\n\nThis will make all `@bagaar/ember-breadcrumbs` components available inside the engine.\n\n```json\n{\n  \"dependencies\": {\n    \"@bagaar/ember-breadcrumbs\": \"*\"\n  }\n}\n```\n\n### 2\\. Make the `breadcrumbs` Service Available Inside the Engine\n\nThis will make sure that the same instance of the `breadcrumbs` service is used inside the engine and inside the host application.\n\n```javascript\n// app/app.js\n\nexport default class App extends Application {\n  engines = {\n    'engine-name': {\n      dependencies: {\n        services: ['breadcrumbs'],\n      },\n    },\n  };\n}\n```\n\n```javascript\n// lib/engine-name/addon/engine.js\n\nexport default class EngineName extends Engine {\n  dependencies = {\n    services: ['breadcrumbs'],\n  };\n}\n```\n\n**That's it! Now you should be able to leave behind breadcrumbs inside the engine and render them inside the host application.**\n\n## Contributing\n\nSee the [Contributing](CONTRIBUTING.md) guide for details.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbagaar%2Fember-breadcrumbs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbagaar%2Fember-breadcrumbs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbagaar%2Fember-breadcrumbs/lists"}