Skip to content

Toggle Group

Active: bold
Terminal window
npx skeci-ui add toggle-group
import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group';
import { Bold, Italic } from 'lucide-react';
<ToggleGroup type="single">
<ToggleGroupItem value="bold">
<Bold className="h-4 w-4" />
</ToggleGroupItem>
<ToggleGroupItem value="italic">
<Italic className="h-4 w-4" />
</ToggleGroupItem>
</ToggleGroup>

Multiple Selection

Outline Variant

PropTypeDefaultDescription
type'single' | 'multiple'(required)Whether one or multiple items can be pressed.
valuestring | string[]The controlled value of the pressed item(s).
defaultValuestring | string[]The initial value when uncontrolled.
onValueChange(value: any) => voidCallback fired when the selection changes.
variant'default' | 'outline''default'The visual style of items in the group.
size'default' | 'sm' | 'lg''default'The size of items in the group.
disabledbooleanfalseWhether the entire group is non-interactive.
PropTypeDefaultDescription
valuestring(required)The value associated with this item.
variant'default' | 'outline'Overrides the group’s variant for this item.
size'default' | 'sm' | 'lg'Overrides the group’s size for this item.
disabledbooleanfalseWhether this specific item is non-interactive.