Overview
Forms & inputs
Search for a command to run or a page to navigate to.
Toggle is a two-state button component that can be pressed and unpressed.
import { Toggle } from "@strongtie/design-system/toggle"Not installed yet? Add the package to your app:
<Toggle>| Prop | Type | Default | Description |
|---|---|---|---|
size | "default" | "sm" | "lg" | null | - | |
variant | "default" | "outline" | null | - |
Don't use a toggle for a setting that applies immediately on change — that is a Switch, which reads as on/off rather than pressed/unpressed. Don't use one for form data either; a Checkbox is what submits. Reserve toggles for toolbar-style mode and formatting controls, and use ToggleGroup when several of them belong to one set.