Skip to content
# Breadcrumb ## Description Breadcrumbs show where the current page sits in a hierarchy and give one-click access to its higher levels. Levels that do not fit collapse, at a fixed count or automatically, into a keyboard-operable overflow menu, or the trail wraps or scrolls instead. ## Parameters | Name | Type | Default Value | Description | | :--- | :--- | :------------ | :---------- | | AutoCollapse | `bool` | false | Collapses the items that do not fit into the overflow menu and brings them back as room returns, keeping the trail on one line; once only the last item is left, its text truncates. MaxDisplayedItems still caps the trail and Wrap turns it off. | | AutoReorderOptions | `bool` | false | Keeps the rendered order in sync with the markup order of the options even when they are only reordered. Costs one JS interop call per render; options API only. | | ChildContent | `RenderFragment?` | null | The content of the BitBreadcrumb, that are BitBreadcrumbOption components. | | Classes | `BitBreadcrumbClassStyles?` | null | Custom CSS classes for different parts of the breadcrumb. | | Color | `BitColor?` | null | The general color of the items and the divider of the breadcrumb. An explicit value wins over the --bit-Breadcrumb-* color variables; left unset, the trail keeps the theme's foreground colors unless they say otherwise. | | DividerIcon | `BitIconInfo?` | null | Render a custom divider icon in place of the default chevron. | | DividerIconName | `string?` | null | The divider icon name. | | DividerIconTemplate | `RenderFragment?` | null | The custom template content to render divider icon. | | DividerText | `string?` | null | A plain text divider (for example "/" or "›") to render in place of the default chevron icon. It is ignored when the DividerIconTemplate is provided. | | ExpandOverflow | `bool` | false | Makes the overflow button reveal the collapsed items in place instead of opening a menu. The next change of the items or of the collapsing settings collapses the trail again. | | IconPlacement | `BitPlacement?` | null | Where the icon of each item is rendered relative to its text: before it (Start, the default) or after it (End). An item's own IconPlacement wins. | | Items | `IList<TItem>` | [] | Collection of the items to render in the breadcrumb. | | ItemTemplate | `RenderFragment<TItem>?` | null | The custom template content to render each item. | | MaxDisplayedItems | `uint` | 0 | The maximum number of items to display; the rest collapse into the overflow menu. 0 displays them all. | | MaxItemWidth | `string?` | null | The maximum width of the text of each item as a CSS length (for example "8rem"). Longer text is truncated with an ellipsis and, when the item has no Title, becomes its tooltip. | | NameSelectors | `BitBreadcrumbNameSelectors<TItem>?` | null | Names and selectors of the custom input type properties. | | NewTabHint | `string?` | null | Replaces the visually hidden "(opens in a new tab)" an item whose Target is _blank is announced with, e.g. to translate it. An empty value removes it. | | NoNewTabHint | `bool` | false | Stops the items whose Target is _blank from announcing that they open a new tab - only for where a visible label or heading already says so. | | OnItemClick | `EventCallback<TItem>` | | Callback for when an item is clicked, whether it is rendered as a link or as a button. | | Options | `RenderFragment?` | null | Alias of the ChildContent. | | OverflowAriaLabel | `string?` | More items | Accessible label of the overflow button, which also names the menu it opens. | | OverflowIndex | `uint` | 0 | Where the overflow button sits among the displayed items; the collapsed items start there. 0 collapses from the root, 1 keeps the root and collapses the middle. | | OverflowIcon | `BitIconInfo?` | null | Render a custom overflow icon in place of the default icon. | | OverflowIconName | `string?` | More | The overflow icon name. | | OverflowIconTemplate | `RenderFragment?` | null | The custom template content to render the overflow icon. | | OverflowTemplate | `RenderFragment<TItem>?` | null | The custom template content to render each item in overflow list. | | Scrollable | `bool` | false | Lets a long trail scroll sideways instead of overflowing its container, scrolled to its end so the current page is in view. Ignored while Wrap is on. | | SelectedItemAsText | `bool` | false | Renders the selected item as plain text instead of as a link or a button. It keeps its aria-current. | | Size | `BitSize?` | null | The size of the items of the breadcrumb. An explicit value wins over the --bit-Breadcrumb-* size variables; left unset, the breadcrumb is medium unless they say otherwise. | | StructuredData | `bool` | false | Renders the whole trail, collapsed items included, as a schema.org BreadcrumbList JSON-LD script for search engines, with each Href resolved to an absolute URL. | | Styles | `BitBreadcrumbClassStyles?` | null | Custom CSS styles for different parts of the breadcrumb. | | Wrap | `bool` | false | Lets a long trail wrap onto more lines instead of overflowing its container. It turns AutoCollapse and Scrollable off; a fixed MaxDisplayedItems still applies. | | AriaLabel | `string?` | null | Gets or sets the accessible label for the component, used by assistive technologies. | | Class | `string?` | null | Gets or sets the CSS class name(s) to apply to the rendered element. | | Dir | `BitDir?` | null | Gets or sets the text directionality for the component's content. | | Disabled | `bool` | false | Gets or sets a value indicating whether the component is disabled and cannot respond to user interaction. | | ForceAnimation | `bool` | false | Gets or sets a value indicating whether the component's animations play at their full duration even when reduced motion is requested. | | HtmlAttributes | `Dictionary<string, object>` | new Dictionary<string, object>() | Captures additional HTML attributes to be applied to the rendered element, in addition to the component's parameters. An attribute written on the component wins over an entry of the same name. | | Id | `string?` | null | Gets or sets the unique identifier for the component's root element. | | Style | `string?` | null | Gets or sets the CSS style string to apply to the rendered element. | | TabIndex | `string?` | null | Gets or sets the tab order index for the component when navigating with the keyboard. | | Visibility | `BitVisibility` | BitVisibility.Visible | Gets or sets the visibility state (visible, hidden, or collapsed) of the component. | ## Public Members | Name | Type | Default Value | Description | | :--- | :--- | :------------ | :---------- | | UniqueId | `Guid` | Guid.NewGuid() | Gets the readonly unique identifier for the component's root element, assigned when the component instance is constructed. | | RootElement | `ElementReference` | | Gets the reference to the root HTML element associated with this component. | ## Enums ### BitColor Enum | Name | Value | Description | | :--- | :--- | :---------- | | Primary | 0 | Primary general color. | | Secondary | 1 | Secondary general color. | | Tertiary | 2 | Tertiary general color. | | Info | 3 | Info general color. | | Success | 4 | Success general color. | | Warning | 5 | Warning general color. | | SevereWarning | 6 | SevereWarning general color. | | Error | 7 | Error general color. | | PrimaryBackground | 8 | Primary background color. | | SecondaryBackground | 9 | Secondary background color. | | TertiaryBackground | 10 | Tertiary background color. | | PrimaryForeground | 11 | Primary foreground color. | | SecondaryForeground | 12 | Secondary foreground color. | | TertiaryForeground | 13 | Tertiary foreground color. | | PrimaryBorder | 14 | Primary border color. | | SecondaryBorder | 15 | Secondary border color. | | TertiaryBorder | 16 | Tertiary border color. | ### BitLinkRels Enum | Name | Value | Description | | :--- | :--- | :---------- | | Alternate | 1 | Provides a link to an alternate representation of the document. (i.e. print page, translated or mirror) | | Author | 2 | Provides a link to the author of the document. | | Bookmark | 4 | Permanent URL used for bookmarking. | | External | 8 | Indicates that the referenced document is not part of the same site as the current document. | | Help | 16 | Provides a link to a help document. | | License | 32 | Provides a link to licensing information for the document. | | Next | 64 | Provides a link to the next document in the series. | | NoFollow | 128 | Links to an unendorsed document, like a paid link. ("NoFollow" is used by Google, to specify that the Google search spider should not follow that link) | | NoOpener | 256 | Requires that any browsing context created by following the hyperlink must not have an opener browsing context. | | NoReferrer | 512 | Makes the referrer unknown. No referrer header will be included when the user clicks the hyperlink. | | Prev | 1024 | The previous document in a selection. | | Search | 2048 | Links to a search tool for the document. | | Tag | 4096 | A tag (keyword) for the current document. | | Me | 8192 | Indicates that the linked document represents the person who owns the current content. (used for identity verification) | | Opener | 16384 | Requires that any browsing context created by following the hyperlink keeps its opener browsing context. (reverses the implicit noopener modern browsers apply to _blank targets) | | PrivacyPolicy | 32768 | Links to the privacy policy that applies to the current document. (rendered as privacy-policy) | | Sponsored | 65536 | Marks the link as an advertisement or paid placement, so search engines do not count it as an organic endorsement. | | TermsOfService | 131072 | Links to the terms of service that apply to the current document. (rendered as terms-of-service) | | Ugc | 262144 | Marks the link as user-generated content, like forum posts or comments, for search engines. | ### BitPlacement Enum | Name | Value | Description | | :--- | :--- | :---------- | | Top | 0 | The top edge. | | Bottom | 1 | The bottom edge. | | Start | 2 | The edge the reading direction starts from - the left in LTR, the right in RTL. On the vertical axis, which does not turn around, it is the top. | | End | 3 | The edge the reading direction ends at - the right in LTR, the left in RTL. On the vertical axis, which does not turn around, it is the bottom. | | Left | 4 | The left edge, in both reading directions. | | Right | 5 | The right edge, in both reading directions. | | Center | 6 | The middle of the axis, against neither edge. | | TopAndBottom | 7 | Both edges of the block axis at once. | | StartAndEnd | 8 | Both edges of the inline axis at once, following the reading direction the way Start and End do. | ### BitSize Enum | Name | Value | Description | | :--- | :--- | :---------- | | Small | 0 | The small size. | | Medium | 1 | The medium size. | | Large | 2 | The large size. | ### BitVisibility Enum | Name | Value | Description | | :--- | :--- | :---------- | | Visible | 0 | The content of the component is visible. | | Hidden | 1 | The content of the component is hidden, but the space it takes on the page remains (visibility:hidden). | | Collapsed | 2 | The component is hidden (display:none). | ### BitDir Enum | Name | Value | Description | | :--- | :--- | :---------- | | Ltr | 0 | Ltr (left to right) is to be used for languages that are written from the left to the right (like English). | | Rtl | 1 | Rtl (right to left) is to be used for languages that are written from the right to the left (like Arabic). | | Auto | 2 | Auto lets the user agent decide. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then applies that directionality to the whole element. | ## Sub Classes ### BitBreadcrumbItem Properties | Name | Type | Default Value | Description | | :--- | :--- | :------------ | :---------- | | Key | `string?` | | A unique value to use as a key of the breadcrumb item. | | Text | `string?` | | Text to display in the breadcrumb item. | | Href | `string?` | | URL to navigate to when the breadcrumb item is clicked. If provided, the breadcrumb will be rendered as a link. | | Class | `string?` | | CSS class attribute for breadcrumb item. | | Style | `string?` | | Style attribute for breadcrumb item. | | Icon | `BitIconInfo?` | | Icon to render next to the item text. | | IconName | `string?` | | Name of an icon to render next to the item text. | | IconPlacement | `BitPlacement?` | | Where the icon is rendered relative to the text, in place of the IconPlacement of the breadcrumb. | | IsSelected | `bool` | | Display the item as the selected item. | | IsDisabled | `bool` | false | Whether an item is disabled or not. | | OnClick | `Action<BitBreadcrumbItem>?` | | Click event handler of the breadcrumb item. | | OverflowTemplate | `RenderFragment<BitBreadcrumbItem>?` | | The custom template for the item in overflow list. | | Rel | `BitLinkRels?` | | The rel attribute of the link of the breadcrumb item. A Target of _blank adds noopener to it, unless it already says NoOpener, NoReferrer or Opener; noreferrer is never added on its own. | | Target | `string?` | | The target of the link of the breadcrumb item (for example "_blank"), applied when the Href is provided. | | Template | `RenderFragment<BitBreadcrumbItem>?` | | The custom template for the item. | | Title | `string?` | | The title (tooltip) of the breadcrumb item, useful to reveal the full text of a truncated item. | | AriaLabel | `string?` | | The accessible label of the breadcrumb item, replacing its text content for assistive technologies. | ### BitBreadcrumbOption Properties | Name | Type | Default Value | Description | | :--- | :--- | :------------ | :---------- | | Key | `string?` | | A unique value to use as a key of the breadcrumb option. | | Text | `string?` | | Text to display in the breadcrumb option. | | Href | `string?` | | URL to navigate to when the breadcrumb option is clicked. If provided, the breadcrumb will be rendered as a link. | | Class | `string?` | | CSS class attribute for breadcrumb option. | | Style | `string?` | | Style attribute for breadcrumb option. | | Icon | `BitIconInfo?` | | Icon to render next to the item text. | | IconName | `string?` | | Name of an icon to render next to the item text. | | IconPlacement | `BitPlacement?` | | Where the icon is rendered relative to the text, in place of the IconPlacement of the breadcrumb. | | IsSelected | `bool` | | Display the breadcrumb option as the selected option. | | IsDisabled | `bool` | false | Whether an option is disabled or not. | | OnClick | `EventCallback<BitBreadcrumbOption>` | | Click event handler of the breadcrumb option. | | OverflowTemplate | `RenderFragment<BitBreadcrumbOption>?` | | The custom template for the option in overflow list. | | Rel | `BitLinkRels?` | | The rel attribute of the link of the breadcrumb option. A Target of _blank adds noopener to it, unless it already says NoOpener, NoReferrer or Opener; noreferrer is never added on its own. | | Target | `string?` | | The target of the link of the breadcrumb option (for example "_blank"), applied when the Href is provided. | | Template | `RenderFragment<BitBreadcrumbOption>?` | | The custom template for the option. | | Title | `string?` | | The title (tooltip) of the breadcrumb option, useful to reveal the full text of a truncated option. | | AriaLabel | `string?` | | The accessible label of the breadcrumb option, replacing its text content for assistive technologies. | ### BitBreadcrumbClassStyles Properties | Name | Type | Default Value | Description | | :--- | :--- | :------------ | :---------- | | Root | `string?` | null | Custom CSS classes/styles for the root element of the BitBreadcrumb. | | Overlay | `string?` | null | Custom CSS classes/styles for the overlay of the BitBreadcrumb. | | ItemContainer | `string?` | null | Custom CSS classes/styles for the item container of the BitBreadcrumb. | | OverflowButton | `string?` | null | Custom CSS classes/styles for the overflow button of the BitBreadcrumb. | | OverflowButtonIcon | `string?` | null | Custom CSS classes/styles for the overflow button icon of the BitBreadcrumb. | | ItemWrapper | `string?` | null | Custom CSS classes/styles for the item wrapper of the BitBreadcrumb. | | Item | `string?` | null | Custom CSS classes/styles for each item of the BitBreadcrumb. | | ItemIcon | `string?` | null | Custom CSS classes/styles for each item icon of the BitBreadcrumb. | | ItemText | `string?` | null | Custom CSS classes/styles for each item text of the BitBreadcrumb. | | SelectedItem | `string?` | null | Custom CSS classes/styles for the selected item of the BitBreadcrumb. | | Divider | `string?` | null | Custom CSS classes/styles for the divider of the BitBreadcrumb. | | DividerIcon | `string?` | null | Custom CSS classes/styles for the divider icon of the BitBreadcrumb. | | Callout | `string?` | null | Custom CSS classes/styles for the callout element of the BitBreadcrumb. | | CalloutContainer | `string?` | null | Custom CSS classes/styles for the callout container of the BitBreadcrumb. | | OverflowItemWrapper | `string?` | null | Custom CSS classes/styles for the overflow item wrapper of the BitBreadcrumb. | | OverflowItem | `string?` | null | Custom CSS classes/styles for each overflow item of the BitBreadcrumb. | | OverflowItemIcon | `string?` | null | Custom CSS classes/styles for each overflow item icon of the BitBreadcrumb. | | OverflowItemText | `string?` | null | Custom CSS classes/styles for each overflow item text of the BitBreadcrumb. | | OverflowSelectedItem | `string?` | null | Custom CSS classes/styles for the overflow selected item of the BitBreadcrumb. | ### BitBreadcrumbNameSelectors<TItem> Properties | Name | Type | Default Value | Description | | :--- | :--- | :------------ | :---------- | | AriaLabel | `BitNameSelectorPair<TItem, string?>` | new(nameof(BitBreadcrumbItem.AriaLabel)) | The AriaLabel field name and selector of the custom input class. | | Key | `BitNameSelectorPair<TItem, string?>` | new(nameof(BitBreadcrumbItem.Key)) | The Key field name and selector of the custom input class. | | Text | `BitNameSelectorPair<TItem, string?>` | new(nameof(BitBreadcrumbItem.Text)) | The Text field name and selector of the custom input class. | | Href | `BitNameSelectorPair<TItem, string?>` | new(nameof(BitBreadcrumbItem.Href)) | The Href field name and selector of the custom input class. | | Class | `BitNameSelectorPair<TItem, string?>` | new(nameof(BitBreadcrumbItem.Class)) | The CSS Class field name and selector of the custom input class. | | Style | `BitNameSelectorPair<TItem, string?>` | new(nameof(BitBreadcrumbItem.Style)) | The CSS Style field name and selector of the custom input class. | | Icon | `BitNameSelectorPair<TItem, BitIconInfo?>` | new(nameof(BitBreadcrumbItem.Icon)) | The Icon field name and selector of the custom input class. | | IconName | `BitNameSelectorPair<TItem, string?>` | new(nameof(BitBreadcrumbItem.IconName)) | The IconName field name and selector of the custom input class. | | IconPlacement | `BitNameSelectorPair<TItem, BitPlacement?>` | new(nameof(BitBreadcrumbItem.IconPlacement)) | The IconPlacement field name and selector of the custom input class. | | IsSelected | `BitNameSelectorPair<TItem, bool>` | new(nameof(BitBreadcrumbItem.IsSelected)) | The IsSelected field name and selector of the custom input class. | | IsDisabled | `BitNameSelectorPair<TItem, bool>` | new(nameof(BitBreadcrumbItem.IsDisabled)) | The IsDisabled field name and selector of the custom input class. | | OnClick | `Action<TItem>?` | | Click event handler of the item. | | OverflowTemplate | `BitNameSelectorPair<TItem, RenderFragment<TItem>?>` | new(nameof(BitBreadcrumbItem.OverflowTemplate)) | The OverflowTemplate field name and selector of the custom input class. | | Rel | `BitNameSelectorPair<TItem, BitLinkRels?>` | new(nameof(BitBreadcrumbItem.Rel)) | The Rel field name and selector of the custom input class. | | Target | `BitNameSelectorPair<TItem, string?>` | new(nameof(BitBreadcrumbItem.Target)) | The Target field name and selector of the custom input class. | | Template | `BitNameSelectorPair<TItem, RenderFragment<TItem>?>` | new(nameof(BitBreadcrumbItem.Template)) | The Template field name and selector of the custom input class. | | Title | `BitNameSelectorPair<TItem, string?>` | new(nameof(BitBreadcrumbItem.Title)) | The Title field name and selector of the custom input class. | ### BitNameSelectorPair<TItem, TProp> Properties | Name | Type | Default Value | Description | | :--- | :--- | :------------ | :---------- | | Name | `string` | | Custom class property name. | | Selector | `Func<TItem, TProp?>?` | | Custom class property selector. | ### BitIconInfo Properties Represents icon information for rendering icons. Supports built-in Fluent UI icons and external icon libraries (FontAwesome, Bootstrap Icons, etc.). Use BitIconInfo.Css("fa-solid fa-star"), BitIconInfo.Fa("solid star"), or BitIconInfo.Bi("star-fill") for external icons. | Name | Type | Default Value | Description | | :--- | :--- | :------------ | :---------- | | Name | `string?` | null | Gets or sets the name of the icon. For external icons, this can be the full CSS class name if BaseClass and Prefix are empty. | | BaseClass | `string?` | null | Gets or sets the base CSS class for the icon. For built-in Fluent UI icons, this defaults to "bit-icon". For external icon libraries like FontAwesome, you might set this to "fa" or leave empty. | | Prefix | `string?` | null | Gets or sets the CSS class prefix used before the icon name. For built-in Fluent UI icons, this defaults to "bit-icon--". For external icon libraries, you might set this to "fa-" or leave empty. | ## CSS Variables Public CSS custom properties read off the component's root. Set one on `:root` to restyle every instance, on any ancestor to restyle the ones inside it, or on the `Style` of one instance to restyle it and every instance nested inside it, which inherits the value too - a parameter changes one alone, as does the real CSS property on its `Style` / `Styles` when that property does not inherit (`opacity`); an inherited one (`color`, `font-family`) reaches the nested instances that do not set it themselves. | Name | Default Value | Description | | :--- | :------------ | :---------- | | `--bit-Breadcrumb-color` | --bit-clr-fg-pri | Text of the items, in the trail and in the overflow menu. The Color parameter wins over it. | | `--bit-Breadcrumb-selected-color` | --bit-Breadcrumb-color | Text of the current (selected) item. The Color parameter wins over it. | | `--bit-Breadcrumb-selected-font-weight` | --bit-tpg-fw-semibold | Weight of the current (selected) item. | | `--bit-Breadcrumb-disabled-color` | --bit-clr-fg-dis | Text of a disabled item or of a disabled breadcrumb. | | `--bit-Breadcrumb-hover-color` | The color at rest | Text of a hovered item or menu item, and the glyph of a hovered overflow button. The Color parameter wins over it. | | `--bit-Breadcrumb-hover-background` | --bit-clr-bg-pri-hover | Background of a hovered item, overflow button or menu item. | | `--bit-Breadcrumb-active-background` | --bit-clr-bg-pri-active | Background of a pressed item, overflow button or menu item. | | `--bit-Breadcrumb-focus-color` | --bit-clr-pri-focus | Focus indicator color. The Color parameter wins over it. While it is unset, the focus ring is the library's own --bit-shd-focus-ring, so replacing that token re-shapes it too. | | `--bit-Breadcrumb-font-size` | --bit-tpg-fs-sm | Text size of the items. The Size parameter wins over it. | | `--bit-Breadcrumb-item-height` | --bit-siz-ctrl-md | Line height of the items, which sets the height of the trail. The Size parameter wins over it. | | `--bit-Breadcrumb-item-padding` | 0 8px | Padding of the items. | | `--bit-Breadcrumb-item-gap` | 8px | Space between the icon and the text of an item. | | `--bit-Breadcrumb-item-radius` | --bit-shp-radius-control | Corner radius of the items and the overflow button. | | `--bit-Breadcrumb-item-max-width` | none | Width the text of an item truncates at. The MaxItemWidth parameter takes precedence and also adds the tooltips. | | `--bit-Breadcrumb-divider-color` | --bit-clr-fg-sec | Color of the dividers and of the overflow button glyph. The Color parameter wins over it. | | `--bit-Breadcrumb-divider-size` | --bit-tpg-fs-md | Size of the divider icons. The Size parameter wins over it. | | `--bit-Breadcrumb-divider-spacing` | 0 | Space on each side of a divider. | | `--bit-Breadcrumb-callout-background` | --bit-clr-bg-pri | Background of the overflow menu. | | `--bit-Breadcrumb-callout-radius` | --bit-shp-radius-popup | Corner radius of the overflow menu. | | `--bit-Breadcrumb-callout-shadow` | --bit-shd-popup | Elevation of the overflow menu. | | `--bit-Breadcrumb-callout-max-width` | The width of the viewport | Widest the overflow menu gets before the text of its rows is truncated. | | `--bit-Breadcrumb-overflow-item-height` | --bit-siz-item-md | Height of a row of the overflow menu. The Size parameter wins over it. | | `--bit-Breadcrumb-overflow-font-size` | --bit-tpg-fs-sm | Text size of a row of the overflow menu. The Size parameter wins over it. | ## Examples
\n**Basic**: ```razor ``` ```csharp private readonly List BreadcrumbItems = [ new() { Text = "Item 1", Href = "/components/breadcrumb" }, new() { Text = "Item 2", Href = "/components/breadcrumb" }, new() { Text = "Item 3", Href = "/components/breadcrumb" }, new() { Text = "Item 4", Href = "/components/breadcrumb", IsSelected = true } ]; private readonly List BreadcrumbItemsDisabled = [ new() { Text = "Item 1", Href = "/components/breadcrumb", IsDisabled = true }, new() { Text = "Item 2", Href = "/components/breadcrumb", IsDisabled = true }, new() { Text = "Item 3", Href = "/components/breadcrumb" }, new() { Text = "Item 4", Href = "/components/breadcrumb", IsSelected = true } ]; private readonly List BreadcrumbItemsWithTarget = [ new() { Text = "Item 1", Href = "/components/breadcrumb" }, new() { Text = "bit BlazorUI", Href = "https://blazorui-ai.bitplatform.dev", Target = "_blank", Title = "Opens the bit BlazorUI website in a new tab" }, new() { Text = "Item 3", Href = "/components/breadcrumb", IsSelected = true } ]; ``` \n**MaxDisplayedItems & OverflowIndex**: ```razor ``` ```csharp private readonly List BreadcrumbItems = [ new() { Text = "Item 1", Href = "/components/breadcrumb" }, new() { Text = "Item 2", Href = "/components/breadcrumb" }, new() { Text = "Item 3", Href = "/components/breadcrumb" }, new() { Text = "Item 4", Href = "/components/breadcrumb", IsSelected = true } ]; ``` \n**Truncation, Wrapping & Scrolling**: ```razor
``` ```csharp private readonly List BreadcrumbItemsWithLongText = [ new() { Text = "Very long folder name 1", Href = "/components/breadcrumb", Title = "Very long folder name 1" }, new() { Text = "Very long folder name 2", Href = "/components/breadcrumb", Title = "Very long folder name 2" }, new() { Text = "Very long folder name 3", Href = "/components/breadcrumb", Title = "Very long folder name 3" }, new() { Text = "Very long folder name 4", Href = "/components/breadcrumb", Title = "Very long folder name 4", IsSelected = true } ]; ``` \n**Auto Collapse**: ```razor
``` ```csharp private readonly List BreadcrumbItemsWithLongText = [ new() { Text = "Very long folder name 1", Href = "/components/breadcrumb", Title = "Very long folder name 1" }, new() { Text = "Very long folder name 2", Href = "/components/breadcrumb", Title = "Very long folder name 2" }, new() { Text = "Very long folder name 3", Href = "/components/breadcrumb", Title = "Very long folder name 3" }, new() { Text = "Very long folder name 4", Href = "/components/breadcrumb", Title = "Very long folder name 4", IsSelected = true } ]; ``` \n**Expand Overflow**: ```razor
``` ```csharp private readonly List BreadcrumbItemsWithControlled = [ new() { Text = "Item 1" }, new() { Text = "Item 2" }, new() { Text = "Item 3" }, new() { Text = "Item 4" }, new() { Text = "Item 5" }, new() { Text = "Item 6", IsSelected = true } ]; private readonly List BreadcrumbItemsWithLongText = [ new() { Text = "Very long folder name 1", Href = "/components/breadcrumb", Title = "Very long folder name 1" }, new() { Text = "Very long folder name 2", Href = "/components/breadcrumb", Title = "Very long folder name 2" }, new() { Text = "Very long folder name 3", Href = "/components/breadcrumb", Title = "Very long folder name 3" }, new() { Text = "Very long folder name 4", Href = "/components/breadcrumb", Title = "Very long folder name 4", IsSelected = true } ]; ``` \n**Icons & Divider**: ```razor ``` ```csharp private readonly List BreadcrumbItemsWithIcon = [ new() { Text = "Item 1", Href = "/components/breadcrumb", IconName = BitIconName.AdminELogoInverse32 }, new() { Text = "Item 2", Href = "/components/breadcrumb", IconName = BitIconName.AppsContent }, new() { Text = "Item 3", Href = "/components/breadcrumb", IconName = BitIconName.AzureIcon }, new() { Text = "Item 4", Href = "/components/breadcrumb", IsSelected = true, IconName = BitIconName.ClassNotebookLogo16 } ]; private readonly List BreadcrumbItemsWithHomeIcon = [ new() { IconName = BitIconName.Home, AriaLabel = "Home", Href = "/components/breadcrumb" }, new() { Text = "Item 2", Href = "/components/breadcrumb" }, new() { Text = "Item 3", Href = "/components/breadcrumb" }, new() { Text = "Item 4", Href = "/components/breadcrumb", IsSelected = true } ]; ``` \n**Templates**: ```razor
@item.Text
@item.Text
``` ```csharp private readonly List BreadcrumbItems = [ new() { Text = "Item 1", Href = "/components/breadcrumb" }, new() { Text = "Item 2", Href = "/components/breadcrumb" }, new() { Text = "Item 3", Href = "/components/breadcrumb" }, new() { Text = "Item 4", Href = "/components/breadcrumb", IsSelected = true } ]; private readonly List BreadcrumbItemTemplateItems = [ new() { Text = "Item 1", Href = "/components/breadcrumb", Template = (item => @
@item.Text
), OverflowTemplate = (item => @
@item.Text
) }, new() { Text = "Item 2", Href = "/components/breadcrumb", Template = (item => @
@item.Text
), OverflowTemplate = (item => @
@item.Text
) }, new() { Text = "Item 3", Href = "/components/breadcrumb", Template = (item => @
@item.Text
), OverflowTemplate = (item => @
@item.Text
) }, new() { Text = "Item 4", Href = "/components/breadcrumb", IsSelected = true, Template = (item => @
@item.Text
), OverflowTemplate = (item => @
@item.Text
) } ]; ``` \n**Events & Dynamic Items**: ```razor Add item ``` ```csharp private readonly List BreadcrumbItemsWithCustomized = [ new() { Text = "Item 1" }, new() { Text = "Item 2" }, new() { Text = "Item 3" }, new() { Text = "Item 4", IsSelected = true } ]; // Going back up to an item drops the levels below it, which makes it the current page. private void HandleOnCustomizedItemClick(BitBreadcrumbItem item) { var index = BreadcrumbItemsWithCustomized.IndexOf(item); BreadcrumbItemsWithCustomized.RemoveRange(index + 1, BreadcrumbItemsWithCustomized.Count - index - 1); item.IsSelected = true; } private void AddBreadcrumbItem() { BreadcrumbItemsWithCustomized[^1].IsSelected = false; BreadcrumbItemsWithCustomized.Add(new() { Text = $"Item {BreadcrumbItemsWithCustomized.Count + 1}", IsSelected = true }); } ``` \n**Structured Data**: ```razor ``` ```csharp private readonly List BreadcrumbItems = [ new() { Text = "Item 1", Href = "/components/breadcrumb" }, new() { Text = "Item 2", Href = "/components/breadcrumb" }, new() { Text = "Item 3", Href = "/components/breadcrumb" }, new() { Text = "Item 4", Href = "/components/breadcrumb", IsSelected = true } ]; ``` \n**Cascading parameters**: ```razor ``` ```csharp private readonly BitBreadcrumbParams[] breadcrumbParams = [ new() { DividerText = "/", MaxDisplayedItems = 3, OverflowIndex = 1, SelectedItemAsText = true, } ]; private readonly List BreadcrumbItems = [ new() { Text = "Item 1", Href = "/components/breadcrumb" }, new() { Text = "Item 2", Href = "/components/breadcrumb" }, new() { Text = "Item 3", Href = "/components/breadcrumb" }, new() { Text = "Item 4", Href = "/components/breadcrumb", IsSelected = true } ]; ``` \n**Color**: ```razor ``` ```csharp private readonly List BreadcrumbItems = [ new() { Text = "Item 1", Href = "/components/breadcrumb" }, new() { Text = "Item 2", Href = "/components/breadcrumb" }, new() { Text = "Item 3", Href = "/components/breadcrumb" }, new() { Text = "Item 4", Href = "/components/breadcrumb", IsSelected = true } ]; ``` \n**External Icons**: ```razor ``` ```csharp private readonly List BreadcrumbItemsWithExternalIcon1 = [ new() { Text = "Home", Icon = "fa-solid fa-house" }, new() { Text = "Products", Icon = "fa-solid fa-box" }, new() { Text = "Electronics", Icon = "fa-solid fa-microchip" }, new() { Text = "Laptops", Icon = "fa-solid fa-laptop", IsSelected = true } ]; private readonly List BreadcrumbItemsWithExternalIcon2 = [ new() { Text = "Home", Icon = BitIconInfo.Css("fa-solid fa-house") }, new() { Text = "Products", Icon = BitIconInfo.Css("fa-solid fa-box") }, new() { Text = "Electronics", Icon = BitIconInfo.Css("fa-solid fa-microchip") }, new() { Text = "Laptops", Icon = BitIconInfo.Css("fa-solid fa-laptop"), IsSelected = true } ]; private readonly List BreadcrumbItemsWithExternalIcon3 = [ new() { Text = "Home", Icon = BitIconInfo.Fa("solid house") }, new() { Text = "Products", Icon = BitIconInfo.Fa("solid box") }, new() { Text = "Electronics", Icon = BitIconInfo.Fa("solid microchip") }, new() { Text = "Laptops", Icon = BitIconInfo.Fa("solid laptop"), IsSelected = true } ]; private readonly List BreadcrumbItemsWithExternalIcon4 = [ new() { Text = "Home", Icon = BitIconInfo.Bi("house-fill") }, new() { Text = "Products", Icon = BitIconInfo.Bi("box-seam-fill") }, new() { Text = "Electronics", Icon = BitIconInfo.Bi("cpu-fill") }, new() { Text = "Laptops", Icon = BitIconInfo.Bi("laptop-fill"), IsSelected = true } ]; ``` \n**Size**: ```razor ``` ```csharp private readonly List BreadcrumbItems = [ new() { Text = "Item 1", Href = "/components/breadcrumb" }, new() { Text = "Item 2", Href = "/components/breadcrumb" }, new() { Text = "Item 3", Href = "/components/breadcrumb" }, new() { Text = "Item 4", Href = "/components/breadcrumb", IsSelected = true } ]; ``` \n**Style & Class**: ```razor
``` ```csharp private readonly List BreadcrumbItems = [ new() { Text = "Item 1", Href = "/components/breadcrumb" }, new() { Text = "Item 2", Href = "/components/breadcrumb" }, new() { Text = "Item 3", Href = "/components/breadcrumb" }, new() { Text = "Item 4", Href = "/components/breadcrumb", IsSelected = true } ]; private readonly List BreadcrumbItemsWithClass = [ new() { Text = "Item 1", Href = "/components/breadcrumb", Class = "custom-item-1" }, new() { Text = "Item 2", Href = "/components/breadcrumb", Class = "custom-item-2" }, new() { Text = "Item 3", Href = "/components/breadcrumb", Class = "custom-item-1" }, new() { Text = "Item 4", Href = "/components/breadcrumb", Class = "custom-item-2", IsSelected = true } ]; private readonly List BreadcrumbItemsWithStyle = [ new() { Text = "Item 1", Href = "/components/breadcrumb", Style = "color: dodgerblue; text-shadow: dodgerblue 0 0 1rem;" }, new() { Text = "Item 2", Href = "/components/breadcrumb", Style = "color: aqua; text-shadow: aqua 0 0 1rem;" }, new() { Text = "Item 3", Href = "/components/breadcrumb", Style = "color: dodgerblue; text-shadow: dodgerblue 0 0 1rem;" }, new() { Text = "Item 4", Href = "/components/breadcrumb", Style = "color: aqua; text-shadow: aqua 0 0 1rem;", IsSelected = true } ]; ``` \n**RTL**: ```razor ``` ```csharp private readonly List RtlBreadcrumbItems = [ new() { Text = "پوشه اول" }, new() { Text = "پوشه دوم" }, new() { Text = "پوشه سوم" }, new() { Text = "پوشه چهارم" }, new() { Text = "پوشه پنجم" }, new() { Text = "پوشه ششم", IsSelected = true }, ]; ```