Tailwind CSS Switch/Toggle
Build Tailwind CSS switch and toggle components with descriptions, disabled states, icons, tooltips, colors, rounded shapes, sizes, and form validation.
Heads up!
By default Preline UI uses Tailwind CSS Forms plugin. Don't forget to install it!
Switch with description
Pair a switch with supporting text when the setting needs a little more context.
Switch with icons
Add icons inside the switch to make the on and off states easier to scan.
Corner radius
Adjust the corner radius to create squared, slightly rounded, or more pill-like switches.
Rounded with icons
Combine rounded switch styles with icons inside the track for clearer on and off states.
Switch with tooltip
Attach a tooltip when the setting needs extra context without adding persistent copy.
Validation states
Show valid and invalid states to give clear feedback when a switch is required in a form.