A
Auralix UI

Toggle Group

A set of two-state buttons that can be toggled on or off.

Preview

Installation

bash
npx auralix-ui add toggle-group

Usage

Toggle Group Demo

tsx
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/ToggleGroup";

<ToggleGroup type="single">
  <ToggleGroupItem value="a">A</ToggleGroupItem>
  <ToggleGroupItem value="b">B</ToggleGroupItem>
</ToggleGroup>

Props

NameTypeDefaultDescription
type"single" | "multiple""single"Selection type.

Variants

Single Selection
Multiple Selection
Outline