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 TypeDefault
Alignment

Specifies the alignment within bar.

Possible values:Default, Start, Center, End

AlignmentAlignment.Default
Breakpoint

Used for responsive collapsing.

Possible values:None, Mobile, ExtraSmall, Tablet, Small, Desktop, Medium, Widescreen, Large, FullHD, ExtraLarge, QuadHD, ExtraExtraLarge

BreakpointBreakpoint.None
ChildContent

Specifies the content to be rendered inside this Bar.

RenderFragmentnull
CollapseMode

Specifies how the bar will be collapsed.

Possible values:Hide, Small

BarCollapseModeBarCollapseMode.Hide
MenuToggleBehavior

Specifies how the bar menu will behave when toggled.

Possible values:AllowSingleMenu, AllowMultipleMenus

BarMenuToggleBehaviorBarMenuToggleBehavior.AllowMultipleMenus
Mode

Specifies the orientation for the bar. Vertical* is required when using as a Sidebar.

Possible values:Horizontal, VerticalPopout, VerticalInline, VerticalSmall

BarModeBarMode.Horizontal
NavigationBreakpoint

Used for responsive collapsing after Navigation.

Possible values:None, Mobile, ExtraSmall, Tablet, Small, Desktop, Medium, Widescreen, Large, FullHD, ExtraLarge, QuadHD, ExtraExtraLarge

BreakpointBreakpoint.None
ThemeContrast

Specifies the preferred theme contrast for this Bar component.

Possible values:None, Light, Dark

ThemeContrastThemeContrast.None
Visible

Controls the state of toggler and the menu.

boolfalse

BarLink

Parameter Description TypeDefault
ChildContent

Specifies the content to be rendered inside this BarLink.

RenderFragmentnull
Match

URL matching behavior for a link.

Possible values:Prefix, All

MatchMatch.All
Target

The target attribute specifies where to open the linked document.

TargetTarget.Default
Title

Specify extra information about the element.

string
To

Specifies the URL of the page the link goes to.

string

BarDropdownToggle

Parameter Description TypeDefault
ChildContent

Specifies the content to be rendered inside this Link.

RenderFragmentnull
Disabled

Makes the link look inactive by adding the disabled boolean attribute.

boolfalse
Indentation

Determines how much left padding will be applied to the dropdown toggle. (in rem unit)

double1.5d
Match

URL matching behavior for a link.

Possible values:Prefix, All

MatchMatch.Prefix
Stretched

Makes any HTML element or component clickable by “stretching” a nested link.

boolfalse
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.

TargetTarget.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.

Remarks

Default: True

bool?null
Trigger

Specifies which interactions can trigger the dropdown toggle.

Possible values:Auto, ToggleClick, IconClick, ClickAny, RouteMatch, All

BarDropdownToggleTriggerdefault(BarDropdownToggleTrigger)
Unstyled

Removes default color styles from the link.

boolfalse

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 DescriptionReturnParameters
HideAllExcept Hides all items except the one that is passed as a parameter. TaskBarItem barItem
Toggle Toggles the Visible state of the Bar component. Task

BarDropdownToggle

Method DescriptionReturnParameters
Close Triggers the closable component to be closed. TaskCloseReason closeReason
IsSafeToClose Finds if the closable component is ready to be closed. Task<bool>string elementId, CloseReason closeReason, bool isChildClicked
On this page