# Breadcrumb
## Description
Breadcrumbs should be used as a navigational aid in your app or site. They indicate the current page’s location within a hierarchy, afford one-click access to the higher levels of it, and handle the levels that do not fit by collapsing them - at a fixed count or automatically as the room changes - into a keyboard-operable overflow menu or behind a button that expands them back into the trail, or by letting the trail wrap onto more lines or scroll sideways instead. The trail is rendered as a navigation landmark holding an ordered list, with the current page marked for assistive technologies (and optionally rendered as plain text rather than a link) and the dividers hidden from them, and it can publish the whole hierarchy as schema.org structured data for search engines.
## Parameters
| Name | Type | Default Value | Description |
| :--- | :--- | :------------ | :---------- |
| AutoCollapse | `bool` | false | Collapses the items that do not fit the width of the breadcrumb into the overflow menu, and brings them back as the room for them returns, so the trail always stays on a single line. MaxDisplayedItems, when it is set, still caps how many items the automatic collapsing may leave in the trail. It is turned off entirely by Wrap, since a trail that may flow onto another line has no items that do not fit. |
| AutoReorderOptions | `bool` | false | Keeps the rendered order of the items in sync with the markup order of the options even when existing options are only reordered (not added or removed). It reads the DOM order of the options after each render, so it adds a JS interop call per render and is opt-in. It only affects the options API (ChildContent/Options). |
| 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. |
| 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 put the collapsed items back into the trail instead of opening them in a menu. The whole trail is revealed at once and the button is gone with the collapsing it undid. The next change of the items or of the collapsing settings starts the breadcrumb over as collapsed. |
| 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 before coalescing. If not specified, all of the items will be rendered. |
| MaxItemWidth | `string?` | null | The maximum width of the text of each item as a CSS length (for example "8rem"). The text of a longer item is truncated with an ellipsis, and the text of an item that carries no Title of its own becomes its tooltip so that the full text stays reachable. |
| NameSelectors | `BitBreadcrumbNameSelectors<TItem>?` | null | Names and selectors of the custom input type properties. |
| OnItemClick | `EventCallback<TItem>` | | Callback for when a breadcrumb item is clicked, no matter whether it is rendered as a link or as a button. |
| Options | `RenderFragment?` | null | Alias of the ChildContent. |
| OverflowAriaLabel | `string?` | More items | Aria label of the overflow button and of the overflow menu. |
| OverflowIndex | `uint` | 0 | Optional index where overflow items will be collapsed. It is the position the overflow button takes among the displayed items, and the items that collapse are the ones that start there, so the default of 0 collapses the trail from its root while 1 keeps the root visible and collapses the middle instead. |
| 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 each overflow icon. |
| OverflowTemplate | `RenderFragment<TItem>?` | null | The custom template content to render each item in overflow list. |
| ReversedIcon | `bool` | false | Reverses the positions of the icon and the item text of the item content. |
| Scrollable | `bool` | false | Lets a long breadcrumb trail scroll sideways inside its container instead of overflowing it, which is what a trail whose every step is worth keeping in place asks for. It has nothing to do while Wrap is on, since a trail that may flow onto another line never runs out of room on one. |
| SelectedItemAsText | `bool` | false | Renders the selected item as plain text instead of as a link or a button, which is what the breadcrumb pattern asks of the page the user is already on. It keeps its aria-current either way, and the items around it stay actionable. |
| Size | `BitSize?` | null | The size of the items of the breadcrumb. |
| StructuredData | `bool` | false | Renders the trail as a schema.org BreadcrumbList in a JSON-LD script next to it, which is what search engines read to show the hierarchy of the page in their results. The whole hierarchy is written, including the items the overflow menu holds, and the Href of each item is resolved against the base address of the app. |
| Styles | `BitBreadcrumbClassStyles?` | null | Custom CSS styles for different parts of the breadcrumb. |
| Wrap | `bool` | false | Lets a long breadcrumb trail wrap into multiple lines instead of overflowing its container in a single line. It turns AutoCollapse and Scrollable off while it is on, though a fixed MaxDisplayedItems still collapses what it is told to. |
| 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. |
| 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. |
| Id | `string?` | null | Gets or sets the unique identifier for the component's root element. |
| IsEnabled | `bool` | true | Gets or sets a value indicating whether the component is enabled and can respond to user interaction. |
| 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. |
### 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. |
| ReversedIcon | `bool?` | | Reverses the positions of the icon and the item text of the item content. |
| IsSelected | `bool` | | Display the item as the selected item. |
| IsEnabled | `bool` | true | Whether an item is enabled or not. |
| OnClick | `Action<BitBreadcrumbItem>?` | | Click event handler of the breadcrumb item. |
| OverflowTemplate | `RenderFragment<BitBreadcrumbItem>?` | | The custom template for the item in overflow list. |
| 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. |
| ReversedIcon | `bool?` | | Reverses the positions of the icon and the item text of the item content. |
| IsSelected | `bool` | | Display the breadcrumb option as the selected option. |
| IsEnabled | `bool` | true | Whether an option is enabled or not. |
| OnClick | `EventCallback<BitBreadcrumbOption>` | | Click event handler of the breadcrumb option. |
| OverflowTemplate | `RenderFragment<BitBreadcrumbOption>?` | | The custom template for the option in overflow list. |
| 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. |
| ReversedIcon | `BitNameSelectorPair<TItem, bool?>` | new(nameof(BitBreadcrumbItem.ReversedIcon)) | The ReversedIcon 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. |
| IsEnabled | `BitNameSelectorPair<TItem, bool>` | new(nameof(BitBreadcrumbItem.IsEnabled)) | The IsEnabled 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. |
| 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. |
## Examples
Item
Custom
Option
\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", IsEnabled = false },
new() { Text = "Item 2", Href = "/components/breadcrumb", IsEnabled = false },
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 = "Item 2", 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 4", 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**Icons**:
```razor
```
```csharp
private readonly List BreadcrumbItemsWitIcon =
[
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 }
];
```
\n**Divider**:
```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**Templates**:
```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 BreadcrumbItemTemplateItems =
[
new()
{
Text = "Item 1", Href = "/components/breadcrumb",
Template = (item => @
```
```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 void HandleOnItemClick(BitBreadcrumbItem item)
{
BreadcrumbItemsWithControlled.First(i => i.IsSelected).IsSelected = false;
item.IsSelected = true;
}
```
\n**Customizations**:
```razor
Add Item
Remove Item
```
```csharp
private int ItemsCount = 4;
private uint OverflowIndex = 2;
private uint MaxDisplayedItems = 3;
private readonly List BreadcrumbItemsWithCustomized =
[
new() { Text = "Item 1" },
new() { Text = "Item 2" },
new() { Text = "Item 3" },
new() { Text = "Item 4", IsSelected = true }
];
private void HandleOnCustomizedItemClick(BitBreadcrumbItem item)
{
BreadcrumbItemsWithCustomized.First(i => i.IsSelected).IsSelected = false;
item.IsSelected = true;
}
private void AddBreadcrumbItem()
{
ItemsCount++;
BreadcrumbItemsWithCustomized.Add(new BitBreadcrumbItem()
{
Text = $"Item {ItemsCount}"
});
}
private void RemoveBreadcrumbItem()
{
if (BreadcrumbItemsWithCustomized.Count > 1)
{
ItemsCount--;
var item = BreadcrumbItemsWithCustomized[^1];
BreadcrumbItemsWithCustomized.Remove(item);
if (item.IsSelected)
{
BreadcrumbItemsWithCustomized[^1].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**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**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" },
new() { Text = "Very long folder name 2", Href = "/components/breadcrumb" },
new() { Text = "Very long folder name 3", Href = "/components/breadcrumb" },
new() { Text = "Very long folder name 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 = "پوشه دوم", IsSelected = true },
new() { Text = "پوشه سوم" },
new() { Text = "پوشه چهارم" },
new() { Text = "پوشه پنجم" },
new() { Text = "پوشه ششم" },
];
```
@item.Text
@item.Text
@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**:
```razor