On this page
@addTagHelper *, Webority.Ui.RazorA view switch
Use a group for a view switch, where the pressed button takes the solid fill and the rest stay outline.
Day, week and month
Vertical stack
Stack the buttons top to bottom when the row is too narrow or the group sits in a side panel.
Stacked range buttons
Full width
Fill the container when the buttons are a row of equal choices, sharing its width equally.
Buttons sharing one row
Every option
Every value of every prop, one cell each.
label
label: names the group for screen readers, no visual change
children
children: the app-button elements inside the group (React: children)
size
size="sm"
size="md" (default)
size="lg"
vertical
vertical="false" (default)
vertical="true"
full-width
full-width="false" (default)
full-width="true"
class
class: extra classes on the group (React: className)
Guidance
What to do, and what to avoid.
Use it when
- Two to five related actions: text styles, bulk actions, a view switch.
- A toolbar section that should read as one control.
Reach for something else when
- Choosing one of a few options. → AppSegmented
- A main action with a few alternatives. → AppSplitButton
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
4 props. The 4 most used come first.
Used on most screens 4 props
| Prop | Type | Default | Description |
|---|---|---|---|
| labeldefault - | string | - | Accessible name for the group ("Text style"). |
| sizedefault md | sm | md | lg | md | One size for every button in the group. |
| verticaldefault false | bool | false | Stack the buttons top to bottom. |
| full-widthdefault false | bool | false | Fill the container, the buttons sharing the row equally. |
Screen reader
2 notes- The group has role group and is announced by its label.
- Each button is still its own tab stop: a button group is a set of actions, not a single-choice control.