Installation
Usage
Example
Size
Validation
There’s an additional SwitchField
component built specifically for easy and clean isomorphic form validation. It leverages Conform and Zod, providing a single source of truth for both frontend and backend while preserving native browser validation APIs. It also seamlessly integrates with the latest React 19 features, such as useServerAction
:
Elastic
Reduce Motion
API Reference
Switch
Prop | Type | Default |
---|---|---|
size | enum | "default" |
invalid | boolean | ― |
elastic | boolean | ― |
reduceMotion | boolean | false |
Root
Prop | Type | Default |
---|---|---|
size | enum | "default" |
invalid | boolean | ― |
elastic | boolean | ― |
reduceMotion | boolean | false |
Support all Radix API
Thumb
Support all Radix API