Toggle Group

Provides a shared state to a series of toggle buttons.

API reference

Import the component and use it as a single part:

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

<ToggleGroup />
PropTypeDefault
classNamestring | (state) => stringundefined
defaultValuearrayundefined
disabledbooleanfalse
loopbooleantrue
onValueChangefunction(groupValue: Array<any>, event: Event) => voidundefined
render| React.ReactElement
| (props, state) => React.ReactElement
undefined
toggleMultiplebooleanfalse
valuearrayundefined
Attribute
Description
data-disabled
data-multiple
data-orientation