RayCraftDocs
v1.0.3 raycraft.dev
On this page

ToggleGroup

Free

Segmented control for one choice (radio group) or several (toggle buttons). Use it for view switchers and formatting toggles.

Example

ToggleGroup control

Parameters

ParameterTypeDescription
ClassstringExtra CSS classes added to the root element.
DisabledboolDisables interaction.
ItemDisabledFunc<TValue, bool>Returns true for items that cannot be changed; the other items stay editable.
ItemIconFunc<TValue, IconName?>Returns the icon of an item.
ItemsIEnumerable<TValue>The options to choose from.
ItemTextFunc<TValue, string>Converts an item to its display text (defaults to ToString()).
LabelstringVisible label text (charts: accessible name; IconButton: accessible name and tooltip).
MultipleboolAllows several selected rows: click, Ctrl+click, Shift+click, Shift+arrows, Ctrl+A (VirtualList).
SizeSizeSmall, Medium (default) or Large; Dialog also has ExtraLarge.
StylestringInline style added to the root element.
ValueTValueCurrent value. Use with @bind-Value.
ValuesIReadOnlyCollection<TValue>The numbers to plot.
VerticalboolLays out or draws vertically instead of horizontally.

Events

EventTypeDescription
ValueChangedEventCallback<TValue>Raised when the value changes.
ValuesChangedEventCallback<IReadOnlyCollection<TValue>>Raised when the chosen items change.

Package

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