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

ParameterDefaultType
AlignmentAlignment.DefaultAlignment

Specifies the alignment within bar.
Possible values:DefaultStartCenterEnd
BreakpointNoneBreakpoint

Used for responsive collapsing.
Possible values:NoneMobileExtraSmallTabletSmallDesktopMediumWidescreenLargeFullHDExtraLargeQuadHDExtraExtraLarge
ChildContentnullRenderFragment

Specifies the content to be rendered inside this Bar.
CollapseModeBarCollapseMode.HideBarCollapseMode

Specifies how the bar will be collapsed.
Possible values:HideSmall
MenuToggleBehaviorAllowMultipleMenusBarMenuToggleBehavior

Specifies how the bar menu will behave when toggled.
Possible values:AllowSingleMenuAllowMultipleMenus
ModeBarMode.HorizontalBarMode

Specifies the orientation for the bar. Vertical* is required when using as a Sidebar.
Possible values:HorizontalVerticalPopoutVerticalInlineVerticalSmall
NavigationBreakpointNoneBreakpoint

Used for responsive collapsing after Navigation.
Possible values:NoneMobileExtraSmallTabletSmallDesktopMediumWidescreenLargeFullHDExtraLargeQuadHDExtraExtraLarge
ThemeContrastLightThemeContrast

Specifies the preferred theme contrast for this Bar component.
Possible values:NoneLightDark
Visibletruebool

Controls the state of toggler and the menu.

BarLink

ParameterDefaultType
ChildContentnullRenderFragment

Specifies the content to be rendered inside this BarLink.
MatchAllMatch

URL matching behavior for a link.
Possible values:PrefixAll
TargetTarget.DefaultTarget

The target attribute specifies where to open the linked document.
Title—string

Specify extra information about the element.
To—string

Specifies the URL of the page the link goes to.

BarDropdownToggle

ParameterDefaultType
ChildContentnullRenderFragment

Specifies the content to be rendered inside this Link.
Disabledfalsebool

Makes the link look inactive by adding the disabled boolean attribute.
Indentation1.5ddouble

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

URL matching behavior for a link.
Possible values:PrefixAll
ShowToggleIcontruebool?

Specifies a value indicating whether the dropdown toggle icon is visible.
When unspecified, uses the theme setting, falling back to true.
Stretchedfalsebool

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

Specifies whether the link element can be focused and where it participates in sequential keyboard navigation.
TargetTarget.DefaultTarget

The target attribute specifies where to open the linked document.
Title—string

Specify extra information about the element.
To—string

Denotes the target route of the link.
ToggleIconVisibletruebool?

Specifies a value indicating whether the dropdown toggle icon is visible.
This parameter is retained for source compatibility. Use ShowToggleIcon instead.

When unspecified, uses the theme setting, falling back to true.

TriggerAutoBarDropdownToggleTrigger

Specifies which interactions can trigger the dropdown toggle.
Possible values:AutoToggleClickIconClickClickAnyRouteMatchAll
Unstyledfalsebool

Removes default color styles from the link.

Events

Bar

EventType
VisibleChangedEventCallback<bool>

Notifies when the bar visibility changes.

BarLink

EventType
ClickedEventCallback<MouseEventArgs>

Notifies when the item is clicked.
CustomMatchFunc<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.

BarDropdownToggle

EventType
ClickedEventCallback<MouseEventArgs>

Notifies when the link is clicked.
CustomMatchFunc<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.

Methods

Bar

MethodReturnParameters
HideAllExceptTaskBarItem barItem

Hides all items except the one that is passed as a parameter.
ToggleTask—

Toggles the Visible state of the Bar component.

BarDropdownToggle

MethodReturnParameters
CloseTaskCloseReason closeReason

Triggers the closable component to be closed.
IsSafeToCloseTask<bool>string elementId, CloseReason closeReason, bool isChildClicked

Finds if the closable component is ready to be closed.
On this page