Toggle Group
A set of two-state buttons of which one can be on at a time, or any number, solid and 8px apart by default.
Usage
Examples
Appearances
appearance on the group paints every item on the kit's one scale: solid, soft, outline, the default, and transparent.
Sizes
size on the group reaches every item, at a Button's heights: xs, sm, base (the default) or lg.
Border radius
borderRadius on the group sets every item's corners, and a joined group's outer ones, on the kit's one scale: none, xs 4px, sm 6px, base 8px (the default), lg 12px, xl 16px or full.
Multiple
type="multiple" lets any number of items be on at once, its value a list, beside a type="single" group that keeps one on at most.
Joined
joined sets the items edge to edge in one bar, its outer corners rounded; by default they stand 8px apart.
Orientation
orientation="vertical" stacks the items, moved through with the up and down arrow keys, beside a group in a row as it is by default.
Disabled
disabled on the group dims every item and holds off clicks and the keyboard, beside a group as it is by default.
Disabled item
disabled on one item dims it alone, beside items as they are by default, and the arrow keys pass it by.
API Reference
ToggleGroup
ToggleGroupProps · components/ToggleGroup/ToggleGroup.types.tsToggleGroupItem
ToggleGroupItemProps · also takes the props of Radix ToggleGroup.ItemIt also takes the props of Radix ToggleGroup.Root.