Blazorise Bar API
Explore the Blazorise Bar API reference for parameters, events, methods, and related types.
For examples and usage guidance, see the Bar documentation.
API
Parameters
Bar
| Parameter | Description | Type | Default |
|---|---|---|---|
Alignment |
Specifies the alignment within bar. Possible values: |
Alignment | Alignment.Default |
Breakpoint |
Used for responsive collapsing. Possible values: |
Breakpoint | Breakpoint.None |
ChildContent |
Specifies the content to be rendered inside this Bar. |
RenderFragment | null |
CollapseMode |
Specifies how the bar will be collapsed. Possible values: |
BarCollapseMode | BarCollapseMode.Hide |
MenuToggleBehavior |
Specifies how the bar menu will behave when toggled. Possible values: |
BarMenuToggleBehavior | BarMenuToggleBehavior.AllowMultipleMenus |
Mode |
Specifies the orientation for the bar. Possible values: |
BarMode | BarMode.Horizontal |
NavigationBreakpoint |
Used for responsive collapsing after Navigation. Possible values: |
Breakpoint | Breakpoint.None |
ThemeContrast |
Specifies the preferred theme contrast for this Bar component. Possible values: |
ThemeContrast | ThemeContrast.None |
Visible |
Controls the state of toggler and the menu. |
bool | false |
BarLink
| Parameter | Description | Type | Default |
|---|---|---|---|
ChildContent |
Specifies the content to be rendered inside this BarLink. |
RenderFragment | null |
Match |
URL matching behavior for a link. Possible values: |
Match | Match.All |
Target |
The target attribute specifies where to open the linked document. |
Target | Target.Default |
Title |
Specify extra information about the element. |
string | |
To |
Specifies the URL of the page the link goes to. |
string |
BarDropdownToggle
| Parameter | Description | Type | Default |
|---|---|---|---|
ChildContent |
Specifies the content to be rendered inside this Link. |
RenderFragment | null |
Disabled |
Makes the link look inactive by adding the disabled boolean attribute. |
bool | false |
Indentation |
Determines how much left padding will be applied to the dropdown toggle. (in rem unit) |
double | 1.5d |
Match |
URL matching behavior for a link. Possible values: |
Match | Match.Prefix |
Stretched |
Makes any HTML element or component clickable by “stretching” a nested link. |
bool | false |
TabIndex |
Specifies whether the link element can be focused and where it participates in sequential keyboard navigation. |
int? | null |
Target |
The target attribute specifies where to open the linked document. |
Target | Target.Default |
Title |
Specify extra information about the element. |
string | |
To |
Denotes the target route of the link. |
string | |
ToggleIconVisible |
Specifies a value indicating whether the dropdown toggle icon is visible. RemarksDefault: True |
bool? | null |
Trigger |
Specifies which interactions can trigger the dropdown toggle. Possible values: |
BarDropdownToggleTrigger | default(BarDropdownToggleTrigger) |
Unstyled |
Removes default color styles from the link. |
bool | false |
Events
Bar
| Event | Description | Type |
|---|---|---|
VisibleChanged |
Notifies when the bar visibility changes. |
EventCallback<bool> |
BarLink
| Event | Description | Type |
|---|---|---|
Clicked |
Notifies when the item is clicked. |
EventCallback<MouseEventArgs> |
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> |
BarDropdownToggle
| Event | Description | Type |
|---|---|---|
Clicked |
Notifies when the link is clicked. |
EventCallback<MouseEventArgs> |
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> |
Methods
Bar
| Method | Description | Return | Parameters |
|---|---|---|---|
HideAllExcept |
Hides all items except the one that is passed as a parameter. | Task | BarItem barItem |
Toggle |
Toggles the Visible state of the Bar component. | Task |
BarDropdownToggle
| Method | Description | Return | Parameters |
|---|---|---|---|
Close |
Triggers the closable component to be closed. | Task | CloseReason closeReason |
IsSafeToClose |
Finds if the closable component is ready to be closed. | Task<bool> | string elementId, CloseReason closeReason, bool isChildClicked |