Animate UI

Switch

A control that allows the user to toggle between checked and not checked.

Made by imskyleen
Edit on GitHub

Installation

Usage

<Switch />

API Reference

Switch

PropTypeDefault
startIcon?
React.ReactElement
-
endIcon?
React.ReactElement
-
thumbIcon?
React.ReactElement
-
pressedWidth?
number
19
...props?
HTMLMotionProps<"button">
-

The asChild property is not supported in the Switch component, as it is used for animation.

Credits

Built by Skyleen. The source code is available on GitHub.