mirror of
https://github.com/Chalarangelo/mini.css.git
synced 2025-07-30 18:40:28 +02:00
Documented switch component
Added usage documentation for switch component, only thing missing now is the addition of the customization documentation.
This commit is contained in:
@@ -434,6 +434,28 @@
|
||||
<li>Remember to use <code><label></code> elements for every single one of your checkbox or radio buttons</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section row">
|
||||
<div class="col-sm-12 col-md-6 col-md-first col-sm-first">
|
||||
<h3>Switches <a href="https://codepen.io/chalarangelo/pen/rwxBPv" target="_blank" class="button small"><i class="fa fa-codepen" aria-hidden="true"></i> View on Codepen</a></h3>
|
||||
<pre><div class="input-group">
|
||||
<input type="checkbox" id="switch1" tabindex="0">
|
||||
<label for="switch1" class="switch">Checkbox switch</label>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<input type="radio" id="radswitch1" tabindex="0" name="radio-group-1">
|
||||
<label for="radswitch1" class="switch">Radio switch</label>
|
||||
</div></pre>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6">
|
||||
<h3>Notes</h3>
|
||||
<ul style="text-align:justify">
|
||||
<li>Use the same structure as checkboxes and radios, add <code>.switch</code> to the <code><label></code> element</li>
|
||||
<li>Add <code><span class="fore-secondary">tabindex</span>=<span class="fore-primary">"0"</span></code> to the <code><input></code> element for accessibility</li>
|
||||
<li>You can add two <code><label></code> elements inside the <code>.input-group</code>, the first one containing the text and the second one the <code>.switch</code> component to reverse the switch's layout</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section row">
|
||||
<div class="col-sm-12 col-md-6 col-md-first col-sm-first">
|
||||
|
Reference in New Issue
Block a user