Toggle Group
Toggle Group
A set of two-state buttons that can be toggled on or off.
Single Selection
Only one item can be selected at a time (radio behavior).
Selected: left
Multiple Selection
Multiple items can be selected simultaneously (checkbox behavior).
Selected:
Text Formatting
Common use case for text editors with live preview.
Sample text with formatting
Scrollable
Enable horizontal scrolling for many options in a constrained width. Ideal for mobile filter bars.
Resize the window — items scroll instead of wrapping.
Filter: all
API Reference
Component parameters and their types.
| Prop | Type | Default | Description |
|---|---|---|---|
| Type | ToggleGroupType | Single | Single or Multiple selection mode. |
| Value | @bind-Value / string? | — | Selected value in Single mode. |
| Values | @bind-Values / List<string>? | — | Selected values in Multiple mode. |
| Scrollable | bool | false | When true, renders as a horizontally scrollable row (hides scrollbar). |