RayCraftDocs
v1.0.3 raycraft.dev
On this page

Button

Free

Triggers an action, or navigates when Href is set (the button then renders as a link with the same look). Three variants (Filled, Outlined, Text), six colors, three sizes, and optional icons before or after the label. For a button with only an icon use IconButton. Loading shows a spinner in place of the start icon and blocks clicks (so a double submit cannot happen); BusyWhileClicking does the same automatically for as long as an asynchronous OnClick handler runs.

Example

Button control

Parameters

ParameterTypeDescription
BusyWhileClickingboolShows the busy state for as long as an asynchronous OnClick handler runs.
ChildContentRenderFragmentContent rendered inside the component.
ClassstringExtra CSS classes added to the root element.
ColorButtonColorPrimary (default), Secondary, Info, Success, Warning or Danger.
DisabledboolDisables interaction.
EndIconIconName?Icon shown after the label.
HrefstringLink address. On a Button it makes the button render as a link with the same look.
LoadingboolShows a progress bar above the rows.
SizeSizeSmall, Medium (default) or Large; Dialog also has ExtraLarge.
StartIconIconName?Icon shown before the label.
StylestringInline style added to the root element.
TargetstringCountdown: the moment to count down to. Button: browser target of the link, for example _blank.
TypestringHow the cell is drawn: Text, Check, Image, Progress, Link, Badge or Dropdown.
VariantVariantVisual style: Filled, Outlined or Text.

Events

EventTypeDescription
OnClickEventCallback<MouseEventArgs>Raised when the button is clicked.

Package

Button is part of RayCraft Free. Package: RayCraft.Blazor. It comes from nuget.org. See Getting started.