components

Toggle Group

A group of toggle buttons that can be used to select multiple options.

Source CodeRadix UI

Installation

pnpm dlx radianui@latest add toggle-group

Usage

Imports

/components/ui/toggle-group.tsx
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group"

Code

/components/ui/toggle-group.tsx
<ToggleGroup>
	<ToggleGroupItem value="bold">Bold</ToggleGroupItem>
	<ToggleGroupItem value="italic">Italic</ToggleGroupItem>
	<ToggleGroupItem value="underline">Underline</ToggleGroupItem>
</ToggleGroup>

Examples

Outline Variant

Ghost Variant

Custom Spacing

Vertical Toggle Group

Disabled State

Props

<ToggleGroup>
NameDefaultValues
variantoutlineghostoutline
size36283236404448
disabledfalseboolean
orientationhorizontalhorizontalvertical
spacing0integer
External Reference--