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

ParameterDefaultType
Activefalsebool

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

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

Specifies the content to be rendered inside this Button.
ColorColor.DefaultColor

Specifies the button color.
CommandnullICommand

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

Reflects the parameter to pass to the CommandProperty upon execution.
ContextMenuPreventDefaultfalsebool

Prevents the browser's default context menu.
Disabledfalsebool

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

Gets or sets whether to use a transparent, borderless appearance with provider-specific interaction states.
Color controls the foreground and interaction palette. This appearance takes precedence over Outline.
IntentnullIntent

Specifies the button intent.
Loadingfalsebool

Shows the loading spinner or a LoadingTemplate.
LoadingTemplatenullRenderFragment

Defines the component loading template.
Outlinefalsebool

Makes the button to have the outlines.
PreventDefaultOnSubmitfalsebool

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

Changes the size of a button.
When omitted, uses the parent Addons size, then the theme input size, then Size.Default.
StretchedLinkfalsebool

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

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

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

Denotes the target route of the Link button.
TypeButtonButtonType

Specifies the button type.
Possible values:ButtonSubmitResetLink

Buttons

ParameterDefaultType
ChildContentnullRenderFragment

Specifies the content to be rendered inside this Buttons.
OrientationHorizontalOrientation

Specifies the button group orientation mode.
Possible values:HorizontalVertical
RoleAddonsButtonsRole

Specifies the role of the button group.
Possible values:AddonsToolbar
SizeDefaultSize

Change the size of multiple buttons at once.
Possible values:DefaultExtraSmallSmallMediumLargeExtraLarge

Events

Button

EventType
ActiveChangedEventCallback<bool>

Notifies when the active state changes. When assigned, clicking the button toggles its active state.
ClickedEventCallback<MouseEventArgs>

Notifies when the button is clicked.
ContextMenuEventCallback<MouseEventArgs>

Notifies when the button context menu is requested.

Methods

Button

MethodReturnParameters
ClickTask—

Programmatically clicks the button.
FocusTaskbool scrollToElement

Sets focus on the button element, if it can be focused.
On this page