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
defaultValue

any[]

undefined

value

any[]

undefined

onValueChange

((groupValue: any[], event: Event) => void)

undefined

toggleMultiple

boolean

false

disabled

boolean

false

loop

boolean

true

orientation

"horizontal" | "vertical"

'horizontal'

className

string | ((state: State) => string)

undefined

render

| ReactElement
| ((props: GenericHTMLProps, state: State) => ReactElement)

undefined

Attribute
Description
data-orientation
data-disabled
data-multiple