-
Bootstrap 4 Toggle is a jQuery plugin/widget that converts plain checkboxes into responsive toggle switch buttons. Project was forked from original Bootstrap Toggle by Min Hur at http://www.bootstraptoggle.com/
For more information and documentation on Bootstrap 4 Toggle visit https://gitbrent.github.io/bootstrap4-toggle/
-
Default Switches
Simply add
data-toggle="toggle"
to convert checkboxes into toggles.Outline Switches
data-onstyle="outline-*"
anddata-offstyle="outline-*"
Sizes
Apply size to switch with
data-size="lg"
,data-size="sm"
,data-size="xs"
Custom Sizes
Apply custom sizes with
data-width
anddata-height
options.Custom Text
Apply text to switch with
data-on
anddata-off
HTML, Icons, Images
You can easily add icons or images since html is supported for on/off text.
Multiple Lines of Text
Toggles with multiple lines will adjust its heights.
Stacked Switches
Wrap checkboxes in
.form-check
for stackable switches.Inline Switches
Add the
.form-check-inline
class to the.form-check
wrapper for inline switches. Usedata-style="mr-*"
for spacing between switch.Animation Speed
Apply
data-style="speed-slow"
ordata-style="speed-fast"
option for animation speed.