Legacy (shadcn-uikit)Components
Toggle
A pressable button that switches between on and off states.
Overview
Toggle functionality is provided through the Toggle Group component, which wraps Base UI's Toggle and ToggleGroup primitives. Use ToggleGroup for groups of related toggles, or a single ToggleGroupItem for standalone toggle behavior.
Usage
import { ToggleGroup, ToggleGroupItem } from '@acronis-platform/shadcn-uikit';Single toggle
Use a ToggleGroup with a single item for standalone toggle behavior:
<ToggleGroup type="multiple">
<ToggleGroupItem value="bold" aria-label="Toggle bold">
<BoldIcon className="h-4 w-4" />
</ToggleGroupItem>
</ToggleGroup>Toggle group
See the Toggle Group documentation page for full examples and API reference.
Edit on GitHub