Skip to main content

Toggle Group

Group toggles into a single control.

View as Markdown

Installation

Component API

PropTypeDefaultDescription
childrenReactNode-The toggles.
The toggles.
labelstring-A caption above the group, wired to it as its accessible name.
A caption above the group, wired to it as its accessible name.
orientationhorizontal | verticalhorizontalStacks the toggles and switches the arrow keys that move focus.
Stacks the toggles and switches the arrow keys that move focus.
multiplebooleanfalse
valuestring[]-
defaultValuestring[]-The pressed toggles on first render, uncontrolled.
The pressed toggles on first render, uncontrolled.
onValueChange(value: string[]) => void-Called with the pressed values whenever they change.
Called with the pressed values whenever they change.
shapenone | rounded | pillrounded
disabledbooleanfalseIgnores interaction on every toggle in the group.
Ignores interaction on every toggle in the group.
animatedbooleantrue
classNamestring-Merged with the group's own classes, so a utility you pass wins.
Merged with the group's own classes, so a utility you pass wins.