TextBreadcrumbs
Description
The TextBreadcrumbs component is used as a navigational container that aggregates multiple TextBreadcrumb components. It displays a series of navigational links (breadcrumbs) that help users understand their current location within a hierarchical structure. Use this component when you want to provide users with one-click access to higher levels in your app's navigation hierarchy.
Usage
Instantiate TextBreadcrumbs using the static helper method from Tesserae.UI. Chain the Items() method to add individual TextBreadcrumb elements. The component supports method chaining and fluent interface conventions.
API reference
public class TextBreadcrumb : ComponentBase<TextBreadcrumb, HTMLSpanElement>Represents an item in a component.
Constructors
public class TextBreadcrumbs : IComponent, IContainer<TextBreadcrumbs, TextBreadcrumb>, ITextFormating, IHasForegroundColorA breadcrumb component that displays a path as a sequence of text links.
Constructors
Properties
public virtual TextWeight Weight { get ; set ; }Gets or sets the text weight.
public TextAlign TextAlign { get ; set ; }Gets or sets the text alignment.
Methods
public void Replace(TextBreadcrumb newComponent, TextBreadcrumb oldComponent)Replaces a breadcrumb.
Parameters
- newComponent
- The new breadcrumb.
- oldComponent
- The old breadcrumb.
public void Add(TextBreadcrumb component)Adds a breadcrumb.
Parameters
- component
- The breadcrumb to add.
public TextBreadcrumbs Items(params TextBreadcrumb[] children)Adds multiple breadcrumbs.
Parameters
- children
- The breadcrumbs to add.
Returns
The current instance.
Samples
Basic Breadcrumbs Usage
This sample demonstrates how to create a TextBreadcrumbs container with a series of TextBreadcrumbs items. Each TextBreadcrumb fires an event on click that can be used to update UI or perform custom logic.