ToggleGroup API
import { ToggleGroup } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
activation | 'auto' | 'manual' | |
allowEmpty | boolean | |
children | React.ReactNode | |
density | 'compact' | 'default' | 'comfortable' | |
disabled | boolean | |
elevation | 'default' | 'none' | |
headless | boolean | |
multiple | boolean | |
onChange | (detail: ToggleGroupDetail) => void | |
onInput | (detail: ToggleGroupDetail) => void | |
onValueChange | (detail: ToggleGroupDetail) => void | |
orientation | 'horizontal' | 'vertical' | |
required | boolean | |
shape | 'default' | 'square' | 'pill' | |
size | 'sm' | 'md' | 'lg' | |
value | string | string[] | |
variant | 'default' | 'soft' | 'contrast' | 'minimal' |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
ToggleGroup.Item props
| Prop | Type | Description |
|---|---|---|
disabled | boolean | |
elevation | 'default' | 'none' | |
headless | boolean | |
iconOff | string | |
iconOn | string | |
loading | boolean | |
name | string | |
onChange | (detail: ToggleDetail) => void | |
onInput | (detail: ToggleDetail) => void | |
pressed | boolean | |
required | boolean | |
shape | 'default' | 'square' | 'pill' | |
size | 'sm' | 'md' | 'lg' | |
tone | 'brand' | 'success' | 'warning' | 'danger' | |
value | string | |
variant | 'default' | 'soft' | 'outline' | 'contrast' | 'minimal' |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-toggle-group>
ToggleGroup renders the ui-toggle-group custom element from @editora/ui-core, which can also be used without React.
Attributes: activation, allow-empty, aria-label, density, disabled, elevation, headless, multiple, orientation, required, shape, size, value, variant
Events: change, input