Viana Kitv0.1.4

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.

PropTypeDefaultDescription
type"single" | "multiple""single"The type of toggle group.
valuestringThe controlled value of the selected item.
onValueChange(value: string) => voidCallback fired when the value changes.
classNamestringAdditional 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 }