Switch
A component for toggling between two states, typically on and off. It's essentially a checkbox in the form of a switch.
In this guide, you'll learn how to use the Switch component.
Was this example helpful?
Usage#
API Reference#
This component is based on the Radix UI Switch primitive.
Prop | Type | Default |
---|---|---|
size | "small" | "base" | "base" |
Was this helpful?
Examples#
Switch Sizes#
Was this example helpful?
Controlled Switch#
You are not managing inventory
Disabled Switch#
Was this example helpful?
Was this guide helpful?