Components · Interactive
Toggle Group
StableAdded v0.0.1
Group of toggle buttons where one or many can be active.
import { ToggleGroup } from '@nexub/react';Playground
Props
type
<ToggleGroup.Root defaultValue="left" type="single">…</ToggleGroup.Root>Examples
Single
Multiple
States
defaultvariant="default"variant="outline"
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| typerequired | 'single' | 'multiple' | — | Controls whether one or multiple items can be active at a time. |
| value | string | string[] | — | The controlled active value(s). |
| variant | 'default' | 'outline' | — | Visual style applied to all toggle items in the group. |
On iOS & Android
Web only
Toggle Group has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.