Skip to content
Eskais UI

Forms

Toggle Group

UI SDK ToggleGroup: toggles sharing one value with arrow-key focus, named by Field.

Example

Installation

npx shadcn@latest add @eskais/toggle-group
Brings alongtogglefield

Usage

Import
import {  createToggleGroupController,  ToggleGroup,  Toggle,  ToggleIcon,  toggleVariants,} from "@/components/ui/toggle-group"

API reference

Other exports

createToggleGroupControllerToggleToggleIcontoggleVariantstype ToggleGroupControllertype ToggleGroupStatetype ToggleGroupValueChangeReason

Accessibility

  • One tab stop with arrow-key focus; single or multiple values.

Agent actions

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.