Sidebar2
This documentation provides a comprehensive reference for the
Sidebar2 component, guiding you through its configuration options.Screenshot #

Sidebar Parameters #
| Name | Type | Default | Required | Description | Added Version |
|---|---|---|---|---|---|
| AdditionalAttributes | Dictionary<string, object>? | null | Gets or sets additional attributes that will be applied to the component. | 1.0.0 | |
| BadgeText | string? | null | Gets or sets the badge text. | 2.1.0 | |
| Class | string? | null | Gets or sets the CSS class name(s) to apply to the component. | 1.0.0 | |
| CustomIconName | string? | null | Gets or sets the custom icon name. | 2.1.0 | |
| DataProvider | Sidebar2DataProviderDelegate? | null | Gets or sets the data provider. | 2.1.0 | |
| Href | string? | Empty string | Gets or sets the Href. | 3.0.0 | |
| IconName | IconName | None | Gets or sets the IconName. | 2.1.0 | |
| Id | string? | null | Gets or sets the ID. If not set, a unique ID will be generated. | 1.0.0 | |
| ImageSrc | string? | null | Gets or sets the Sidebar2 logo. | 2.1.0 | |
| ImageWidth | float | 0 | Gets or sets the width of the image in pixels. You can change the unit by setting WidthUnit. | 3.4.0 | |
| Style | string? | null | Gets or sets the CSS style string that defines the inline styles for the component. | 1.0.0 | |
| Title | string? | null | Gets or sets the Sidebar2 title. | 2.1.0 | |
| Width | float | 270 | Gets or sets the Sidebar2 width. | 3.0.0 | |
| WidthUnit | Unit | Px | Gets or sets the Sidebar2 width unit. | 3.0.0 |
Sidebar Methods #
| Name | Return type | Description | Added Version |
|---|---|---|---|
| RefreshDataAsync(bool firstRender) | Task | Refresh the Sidebar2 data. | 2.1.0 |
| ToggleSidebar() | Void | Toggles Sidebar2. | 2.1.0 |
NavItem Properties #
| Name | Type | Default | Required | Description | Added Version |
|---|---|---|---|---|---|
| Class | string? | null | Gets or sets an additional CSS class. | 1.10.3 | |
| CustomIconName | string? | null | Gets or sets the name of the custom icon to display. | 1.4.0 | |
| Href | string? | null | Gets or sets the HyperText Reference (href). | 1.4.0 | |
| IconColor | IconColor | null | Gets or sets the icon color. | 1.4.0 | |
| IconName | IconName | null | Gets or sets the icon name. | 1.4.0 | |
| Id | string? | null | Gets or sets the Id. | 1.4.0 | |
| Level | int | null | Gets or sets the item level. | 1.4.0 | |
| Match | NavLinkMatch | null | Gets or sets the URL matching behavior. | 2.1.0 | |
| ParentId | string? | null | Gets or sets the parent Id. | 1.4.0 | |
| Sequence | int | null | Gets or sets the sequence. | 1.4.0 | |
| Target | Target | null | Gets or sets the target. | 1.4.0 | |
| Text | string? | null | Gets or sets the navigation link text. | 1.4.0 |