Installation
npx shadcn@latest add @iconiq/r-togglegroupProps
ToggleGroup
Root container for a connected set of toggle buttons with shared variant, size, spacing, and orientation settings, layered over Radix UI toggle-group primitives.
type"single" | "multiple"Default "multiple"
valuestring | string[]defaultValuestring | string[]onValueChange(value: string | string[]) => voidvariant"default" | "outline"Default "default"
size"default" | "sm" | "lg"Default "default"
spacingnumberDefault 1
orientation"horizontal" | "vertical"Default "horizontal"
disabledbooleanclassNamestringRadix uses type="multiple" by default with a string array value. Pass type="single" for one active item.
Default spacing is 4px between items. Pass spacing={0} to remove the gap entirely.
Each item uses the same fluid wipe fill, sheen sweep, and icon press feedback as the standalone Toggle component.
Group items inherit variant and size from context but can override either prop locally.
ToggleGroupItem
Individual toggle button inside the group with the same fluid motion as the standalone toggle.
valuestringRequired
variant"default" | "outline"size"default" | "sm" | "lg"disabledbooleanclassNamestringchildrenReactNodeItems render as Radix toggle-group buttons with the same fluid wipe fill, sheen sweep, and icon press feedback as the standalone toggle.
Items share the standalone toggle fluid motion system: liquid wipe fill, sheen sweep, and icon press squeeze.
Registry bundle
Install the exact registry entry shown on the right when you want the component file and its declared runtime dependencies together.
Dependencies: radix-ui, class-variance-authority, motion.
Installs a Radix toggle group with the same fluid motion as the standalone toggle.
Default spacing leaves a 4px gap between each bordered item.
Pass spacing={0} to pack items with no gap.
The generated registry file is /r/r-togglegroup.json.