Toggle
Actions · upstream shadcn/ui, GitHub theme
A two-state button that can be either on or off.
Variants
Sizes
StatesHover, press and focus: try them here.
With icon
import { Toggle } from "@/components/ui/toggle"
<Toggle>…</Toggle>Tokens it uses
--inputborder#D1D9E0--foregroundtext#1F2328--mutedfill#F6F8FA--destructiveerror#CF222E--ringfocus ring#0969DAShape and type: --ds-radius-button --ds-focus-width --ds-focus-style --ds-focus-offset --ds-disabled-opacity