Getting Started
Foundations
Components
Search for a command to run...
Switches are used to immediately toggle a single setting on or off. Unlike checkboxes, which are typically used in forms that require submission, switches provide instant feedback and apply changes immediately. They're commonly used for settings like enabling/disabling features, turning notifications on/off, or toggling visibility.
Built on top of Radix UI's Switch primitive with full keyboard navigation (Space to toggle), focus management, and accessibility support including proper ARIA attributes and roles.
import { Switch } from "@strongtie/design-system/switch"All components extend Radix UI primitives. See the Radix UI documentation for all available props.
Components can be styled using the className prop. The design system uses Tailwind CSS for styling.
Other CSS classes used by this component:
switchswitch-thumbThis component inherits accessibility features from Radix UI, including: