Toggle Group
A group of two-state toggle buttons used for single-choice segmented selection or multi-choice formatting toolbars.
import
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggleGroup/toggleGroup";$
npx @bloomui-react/cli add toggleGrouptoggleGroup.tsx
Default
Single-selection segmented toggle group.
Variants
Choose from default styling, bordered outline borders, or flat background segments.
variant:
default | bordered | flatColors
Apply custom active theme colors across all selected segments.
color:
default | primary | secondary | accent | success | warning | dangerSizes
Scale toggle group button dimensions: sm, md, or lg.
size:
sm | md | lgRadius
Alter the border radius of the toggle group outer container.
radius:
none | sm | md | lg | xl | 2xl | 3xl | fullAPI Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | 'default' | 'bordered' | 'flat' | 'default' | Visual layout style of items. |
| color | 'default' | 'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'danger' | 'default' | Active segments color highlights. |
| size | 'sm' | 'md' | 'lg' | 'md' | Segment dimensions sizing. |
| radius | 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full' | '2xl' | Rounding border corners on the group container. |