Breadcrumb Item
A single crumb inside fandry-breadcrumb, with a current-page state.
fandry-breadcrumb-item
Example
Link to section ExampleCustom colors and parts
Link to section Custom colors and partsThe same component with a few --fd-* tokens set around it and its parts restyled. The code is under Parts below.
Props
Link to section Props| Prop | Type | Default | Description |
|---|---|---|---|
href | string | '' | Link target — omitted (along with the current page) renders as plain text. |
current | boolean | false | Marks this as the current page (plain text, not a link, + aria-current). |
Parts
Link to section PartsStyle the elements inside the component from your own CSS with ::part(). Every fandry component renders in native shadow DOM, so parts work on LWR and Salesforce alike. For colors, spacing, radius and type across many components, set the --fd-* tokens instead. The code for the "Custom colors and parts" example above:
| Part | Description |
|---|---|
base | The outermost element. |
separator | The separator before the item. |
link | The native <a>. |
States are extra names on a part while the state is on. Name both to style one state, e.g.fandry-checkbox::part(control checked).
| State | Description |
|---|---|
current | The link to the page being viewed. |
<!-- template -->
<div class="brand" onclick={handleNoopClick}>
<fandry-breadcrumb>
<fandry-breadcrumb-item href="#">Home</fandry-breadcrumb-item>
<fandry-breadcrumb-item href="#">Shoes</fandry-breadcrumb-item>
<fandry-breadcrumb-item current>Stride Runner</fandry-breadcrumb-item>
</fandry-breadcrumb>
</div>
/* css */
/* Scoped to this demo. Set the same --fd-* tokens on :root to theme
every fandry-* component on the site. */
.brand {
--fd-primary: 160 84% 26%;
--fd-text-muted: 160 15% 38%;
}
fandry-breadcrumb::part(list) {
padding: 0.5rem 1rem;
background: hsl(160 40% 96%);
border-radius: 999px;
}
fandry-breadcrumb-item::part(separator) {
color: hsl(160 84% 26%);
}
fandry-breadcrumb-item::part(link) {
font-weight: 600;
text-decoration: none;
}
Code
Link to section Code<fandry-breadcrumb-item href="/components">Components</fandry-breadcrumb-item>