Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/site
diff options
context:
space:
mode:
authorGijs Boddeus <botje_gijs@hotmail.com>2018-12-12 16:28:25 +0300
committerXhmikosR <xhmikosr@gmail.com>2018-12-12 16:28:25 +0300
commit180a06eeb7484048c6bfb381b04bd96a858d42e5 (patch)
tree5d05da005cb1023d4e20261c5231b95bd6297fff /site
parentdbadf24bb31379d1310c50bce5c40457fe1b729e (diff)
Add switch custom form control (#23004)
Diffstat (limited to 'site')
-rw-r--r--site/docs/4.1/components/forms.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/site/docs/4.1/components/forms.md b/site/docs/4.1/components/forms.md
index 29f7fc10bc..c47606647f 100644
--- a/site/docs/4.1/components/forms.md
+++ b/site/docs/4.1/components/forms.md
@@ -1185,6 +1185,22 @@ Custom checkboxes and radios can also be disabled. Add the `disabled` boolean at
{% endcapture %}
{% include example.html content=example %}
+### Switches
+
+A switch has the markup of a custom checkbox but uses the `.custom-switch` class to render a toggle switch. Switches also support the `disabled` attribute.
+
+{% capture example %}
+<div class="custom-control custom-switch">
+ <input type="checkbox" class="custom-control-input" id="customSwitch1">
+ <label class="custom-control-label" for="customSwitch1">Toggle this switch element</label>
+</div>
+<div class="custom-control custom-switch">
+ <input type="checkbox" class="custom-control-input" disabled id="customSwitch2">
+ <label class="custom-control-label" for="customSwitch2">Disabled switch element</label>
+</div>
+{% endcapture %}
+{% include example.html content=example %}
+
### Select menu
Custom `<select>` menus need only a custom class, `.custom-select` to trigger the custom styles. Custom styles are limited to the `<select>`'s initial appearance and cannot modify the `<option>`s due to browser limitations.