RayCraftDocs
v1.0.3 raycraft.dev
On this page

ToggleButton

Free

Button that keeps an on/off state and exposes it with aria-pressed.

Example

ToggleButton control

Parameters

ParameterTypeDescription
ChildContentRenderFragmentContent rendered inside the component.
ClassstringExtra CSS classes added to the root element.
ColorButtonColorPrimary (default), Secondary, Info, Success, Warning or Danger.
DisabledboolDisables interaction.
IconIconName?Icon to show (IconName).
PressedboolWhether the button is on. Use with @bind-Pressed.
SizeSizeSmall, Medium (default) or Large; Dialog also has ExtraLarge.
StylestringInline style added to the root element.

Events

EventTypeDescription
PressedChangedEventCallback<bool>Raised when the button is toggled.

Package

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