Tailwind CSS Switch/Toggle

Toggle settings easily with the switch component in David UI. Fully styled with Tailwind CSS, it’s perfect for dark mode toggles or other interactive settings.

Explore our easy-to-integrate examples to implement switch components faster for your Tailwind CSS project.


Basic Switch

A simple toggle switch that changes its background color, border color, and shadow when toggled to the "checked" state.


Switch Checked

In this example, we showcase a switch component set to be checked by default, offering convenience for pre-selected options.


Switch Colors

Try this showcase of toggle switches with diverse color schemes, customizable for various settings or user preferences.


Switch with Label

A toggle switch paired with a descriptive label, making it ideal for settings pages or forms requiring clear binary choices.


Disabled Switch

Illustrates a non-interactive switch styled with opacity and pointer-events restrictions to convey its disabled state visually and functionally.


A toggle with a clickable label containing a hyperlink, useful for options requiring user agreement, such as terms and conditions.


Remember Me Switch/Toggle

A toggle switch accompanied by a descriptive label and additional context, such as "Remember Me" functionality for authentication pages.


Switch Custom Styles

An example of how to apply custom designs to toggle switches for enhanced aesthetics and tailored functionality.