Jone

Toggle Group

A high-quality, unstyled React toggle group component that provides shared state to a series of toggle buttons.

Provides a shared state to a series of toggle buttons.

Anatomy

Import the component and use it as a single part:

Anatomy
import { ToggleGroup } from '@base-ui/react/toggle-group';

<ToggleGroup />;

API reference

Root

NameTypeDefaultDescription
valueOptionalreadonly Value[] | undefinedThe open state of the toggle group represented by an array of the values of all pressed toggle buttons. This is the controlled counterpart of `defaultValue`.
defaultValueOptionalreadonly Value[] | undefinedThe open state of the toggle group represented by an array of the values of all pressed toggle buttons. This is the uncontrolled counterpart of `value`.
disabledOptionalboolean | undefinedfalseWhether the toggle group should ignore user interaction.
orientationOptionalOrientation | undefinedhorizontal
loopFocusOptionalboolean | undefinedtrueWhether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys.
multipleOptionalboolean | undefinedfalseWhen `false` only one item in the group can be pressed. If any item in the group becomes pressed, the others will become unpressed. When `true` multiple items can be pressed.

On this page