Blazorise Button API

Explore the Blazorise Button API reference for parameters, events, methods, and related types.

For examples and usage guidance, see the Button documentation.

API

Parameters

Button

Parameter Description TypeDefault
Active

When set to 'true', places the component in the active state with active styling.

boolfalse
Block

Makes the button to span the full width of a parent.

boolfalse
ChildContent

Specifies the content to be rendered inside this Button.

RenderFragmentnull
Color

Specifies the button color.

ColorColor.Default
Command

Specifies the command to be executed when clicked on a button.

ICommandnull
CommandParameter

Reflects the parameter to pass to the CommandProperty upon execution.

objectnull
ContextMenuPreventDefault

Prevents the browser's default context menu.

boolfalse
Disabled

When set to 'true', disables the component's functionality and places it in a disabled state.

boolfalse
Intent

Specifies the button intent.

Intentnull
Loading

Shows the loading spinner or a LoadingTemplate.

boolfalse
LoadingTemplate

Defines the component loading template.

RenderFragmentnull
Outline

Makes the button to have the outlines.

boolfalse
PreventDefaultOnSubmit

Prevents a default form-post when button type is set to Submit.

boolfalse
Size

Changes the size of a button.

Size?null
StretchedLink

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

boolfalse
TabIndex

If defined, indicates that its element can be focused and can participates in sequential keyboard navigation.

int?null
Target

The target attribute specifies where to open the linked document for a Link.

TargetTarget.Default
To

Denotes the target route of the Link button.

string
Type

Specifies the button type.

Possible values:Button, Submit, Reset, Link

ButtonTypeButtonType.Button

Buttons

Parameter Description TypeDefault
ChildContent

Specifies the content to be rendered inside this Buttons.

RenderFragmentnull
Orientation

Specifies the button group orientation mode.

Possible values:Horizontal, Vertical

OrientationOrientation.Horizontal
Role

Specifies the role of the button group.

Possible values:Addons, Toolbar

ButtonsRoleButtonsRole.Addons
Size

Change the size of multiple buttons at once.

Possible values:Default, ExtraSmall, Small, Medium, Large, ExtraLarge

SizeSize.Default

Events

Button

Event Description Type
ActiveChanged

Notifies when the active state changes. When assigned, clicking the button toggles its active state.

EventCallback<bool>
Clicked

Notifies when the button is clicked.

EventCallback<MouseEventArgs>
ContextMenu

Notifies when the button context menu is requested.

EventCallback<MouseEventArgs>

Methods

Button

Method DescriptionReturnParameters
Click Programmatically clicks the button. Task
Focus Sets focus on the button element, if it can be focused. Taskbool scrollToElement
On this page