Blazorise Sidebar API
Review the components and data model used to build manual or dynamic sidebars.
For setup instructions and examples, see the Sidebar documentation.
API
Parameters
Sidebar
| Parameter | Default | Type |
|---|---|---|
ChildContent | null | RenderFragment |
Specifies the content to be rendered inside this Sidebar. | ||
Data | null | SidebarInfo |
Data for generating sidebar dynamically. | ||
Scrollable | true | bool |
If true, the sidebar will have vertical scrollbar. | ||
Visible | false | bool |
Specifies the sidebar visibility state. | ||
SidebarContent
| Parameter | Default | Type |
|---|---|---|
ChildContent | null | RenderFragment |
Specifies the content to be rendered inside this SidebarContent. | ||
SidebarBrand
| Parameter | Default | Type |
|---|---|---|
ChildContent | null | RenderFragment |
Specifies the content to be rendered inside this SidebarBrand. | ||
SidebarNavigation
| Parameter | Default | Type |
|---|---|---|
ChildContent | null | RenderFragment |
Specifies the content to be rendered inside this SidebarNavigation. | ||
SidebarLabel
| Parameter | Default | Type |
|---|---|---|
ChildContent | null | RenderFragment |
Specifies the content to be rendered inside this SidebarLabel. | ||
SidebarItem
| Parameter | Default | Type |
|---|---|---|
ChildContent | null | RenderFragment |
Specifies the content to be rendered inside this SidebarItem. | ||
SidebarLink
| Parameter | Default | Type |
|---|---|---|
ChildContent | null | RenderFragment |
Specifies the content to be rendered inside this SidebarLink. | ||
Match | All | Match |
URL matching behavior for a link. Possible values: PrefixAll | ||
Target | Default | Target |
The target attribute specifies where to open the linked document. | ||
Title | — | string |
Specify extra information about the element. | ||
To | — | string |
Page address. | ||
Visible | false | bool |
Specifies the visibility of the link. | ||
SidebarSubItem
| Parameter | Default | Type |
|---|---|---|
ChildContent | null | RenderFragment |
Specifies the content to be rendered inside this SidebarSubItem. | ||
Visible | false | bool |
Specifies the visibility of the subitem. | ||
SidebarFooter
| Parameter | Default | Type |
|---|---|---|
ChildContent | null | RenderFragment |
Specifies the content to be rendered inside this SidebarFooter. | ||
Events
SidebarLink
| Event | Type |
|---|---|
Click | EventCallback |
An event that is raised when the link is clicked. | |
CustomMatch | Func<string, bool> |
A callback function that is used to compare current uri with the user defined uri. If defined, the Match parameter will be ignored. | |
Toggled | EventCallback<bool> |
An event that is raised when the link is toggled. | |
Methods
Sidebar
| Method | Return | Parameters |
|---|---|---|
Close | void | — |
Closes the sidebar.
| ||
Open | void | — |
Opens the sidebar.
| ||
Toggle | void | — |
Toggles the sidebar open or close state.
| ||
SidebarSubItem
| Method | Return | Parameters |
|---|---|---|
Toggle | void | bool? visible |
Toggles the visibility of subitem.
| ||
SidebarInfo
Properties
| Property | Type |
|---|---|
Brand | SidebarBrandInfo |
Defines the brand displayed in the sidebar header.
| |
Items | List<SidebarItemInfo> |
Defines the first-level dynamic sidebar items.
| |
SidebarBrandInfo
Properties
| Property | Type |
|---|---|
Text | string |
Defines the brand text.
| |
To | string |
Defines the brand URL.
| |
SidebarItemInfo
Properties
| Property | Type |
|---|---|
Tooltip | string |
Defines the sidebar link tooltip.
| |
Text | string |
Defines the sidebar link text.
| |
To | string |
Defines the sidebar link URL.
| |
Icon | object |
Defines the sidebar link icon.
| |
Visible | bool |
Specifies whether the item and its nested items are visible.
| |
SubItems | List<SidebarItemInfo> |
Defines the nested sidebar items.
| |