Open GitHub repository
ComponentsToggle

Toggle

A two-state button for formatting controls, filters, and other pressable options.

Installation

bunx @swift-rust/ui add toggle

Usage

tsx
1import { Toggle } from "@/components/ui/toggle";
2 
3<Toggle pressed={bold} onClick={() => setBold((value) => !value)}>
4 Bold
5</Toggle>

Examples

single
group