Tailwind CSS Switch - React

Use our Tailwind CSS Switch component to let users adjust settings on/off. The option that the Switch controls, as well as the state it's in, should be made clear from the corresponding inline label.

See below our example that will help you create simple and easy-to-use Switch component for your Tailwind CSS and React project.



Switch Colors

The Switch component comes with 19 different colors that you can change it using the color prop.


Switch with Label

You can add a label for the Switch component by passing the label prop to the Switch component.


Switch Ripple Effect

You can turn on/off the ripple effect for the Switch component using the ripple prop.

Edit this page on Github