preskok/ui

Toggle Group

A toggle group component for single or multiple selection.

Installation

pnpm dlx @preskok-org/ui@latest add toggle-group

Usage

import { ToggleGroup } from "@/registry/preskok/ui/preskok-ui/toggle-group"
 
export function ToggleGroupDemo() {
  return (
    <ToggleGroup selectionMode="single" aria-label="Formatting">
      <ToggleGroup.Item id="bold">Bold</ToggleGroup.Item>
      <ToggleGroup.Item id="italic">Italic</ToggleGroup.Item>
      <ToggleGroup.Item id="underline">Underline</ToggleGroup.Item>
    </ToggleGroup>
  )
}