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 />
Prop | Type | Default | |
---|---|---|---|
className | string | (state) => string | undefined | |
defaultValue | array | undefined | |
disabled | boolean | false | |
loop | boolean | true | |
onValueChange | function(groupValue: Array<any>, event: Event) => void | undefined | |
render | | React.ReactElement | undefined | |
toggleMultiple | boolean | false | |
value | array | undefined |
Attribute | Description | |
---|---|---|
data-disabled | Present when the toggle group is disabled. | |
data-multiple | Present when the toggle group allows multiple buttons to be in the pressed state at the same time. | |
data-orientation | Indicates the orientation of the toggle group. |