Actions
Toggle Group
Ruled cells. The pressed one inverts.
npx shadcn@latest add https://ui.netm8.com/r/toggle-group.json@base-ui/react
Actions
Ruled cells. The pressed one inverts.
npx shadcn@latest add https://ui.netm8.com/r/toggle-group.jsonimport { AlignCenter, AlignJustify, AlignLeft, AlignRight } from "lucide-react"
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group"
export default function ToggleGroupDemo() {
return (
<ToggleGroup defaultValue={["left"]} aria-label="Alignment">
<ToggleGroupItem value="left" aria-label="Left">
<AlignLeft />
</ToggleGroupItem>
<ToggleGroupItem value="center" aria-label="Centre">
<AlignCenter />
</ToggleGroupItem>
<ToggleGroupItem value="right" aria-label="Right">
<AlignRight />
</ToggleGroupItem>
<ToggleGroupItem value="justify" aria-label="Justify">
<AlignJustify />
</ToggleGroupItem>
</ToggleGroup>
)
}