Skip to content

Commit 3b53abb

Browse files
authored
Add an example of a Switch to the README
1 parent 27e697e commit 3b53abb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,13 @@ Check boxes and radio buttons are wrapped in a `div.form-check`. You can add cla
366366
```erb
367367
<%= f.radio_button :skill_level, 0, label: "Novice", inline: true, wrapper_class: "w-auto" %>
368368
```
369+
#### Switches
370+
371+
To render checkboxes as switches with Bootstrap 4.2+, add the proper wrapper class:
372+
373+
```erb
374+
<%= f.check_box :remember_me, custom: true, wrapper_class: 'custom-switch' %>
375+
```
369376

370377
#### Collections
371378

0 commit comments

Comments
 (0)