Search...

Switch

Bootstrap 5 Switch

The Contrast Bootstrap 5 Switch is a simple component that can be used to toggle between two options. It is mostly used as a switch.

It is commonly utilized in forms because of its simplicity and efficiency.

Contrast Bootstrap 5 Switch

HTML
html
<label class="custom-switch">
<input type="checkbox" />
<span class="custom-control"></span>
</label>
<label class="custom-switch">
<input type="checkbox" checked />
<span class="custom-control"></span>
</label>

Rounded Switch

To make your switch have a rounded border, use the custom-switch-rounded command.

HTML
html
<label class="custom-switch custom-switch-rounded">
<input type="checkbox" />
<span class="custom-control"></span>
</label>
<label class="custom-switch custom-switch-rounded">
<input type="checkbox" checked />
<span class="custom-control"></span>
</label>

Build modern projects using Bootstrap 5 and Contrast

Trying to create components and pages for a web app or website from scratch while maintaining a modern User interface can be very tedious. This is why we created Contrast, to help drastically reduce the amount of time we spend doing that. so we can focus on building some other aspects of the project.

Contrast Bootstrap PRO consists of a Premium UI Kit Library featuring over 10000+ component variants. Which even comes bundled together with its own admin template comprising of 5 admin dashboards and 23+ additional admin and multipurpose pages for building almost any type of website or web app.
See a demo and learn more about Contrast Bootstrap Pro by clicking here.