Toggle switch
Bootstrap 5 Toggle switch component
Responsive toggle switch built with Bootstrap 5. Enhance your web design with intuitive, user-friendly toggle switches for seamless interaction.
Basic example
A switch has the markup of a custom checkbox but uses the
.form-switch
class to render a toggle switch. Consider using role="switch"
to more accurately convey the nature of the control to assistive technologies that
support this role. In older assistive technologies, it will simply be announced as a regular checkbox as a fallback.
Switches also support the disabled
attribute.