Components
Toggle Group
A set of two-state buttons that can be toggled together.
example.tsx
Default
Outline
Import
tsx
import { AppToggleGroup, AppToggleGroupItem } from "@/components/primitives/AppToggleGroup"API Reference
AppToggleGroup extends all native <div> HTML attributes.
| Prop | Type | Default | Description |
|---|---|---|---|
| type | "single" | "multiple" | "single" | The type of toggle group. |
| value | string | — | The controlled value of the selected item. |
| onValueChange | (value: string) => void | — | Callback fired when the value changes. |
| className | string | — | Additional Tailwind classes merged via cn(). |
Source
src/components/primitives/AppToggleGroup.tsx
import { ToggleGroup, ToggleGroupItem } from "../ui/toggle-group"
const AppToggleGroup = ToggleGroup
const AppToggleGroupItem = ToggleGroupItem
export { AppToggleGroup, AppToggleGroupItem }