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