mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 20:19:13 +00:00
Move to correct position
This commit is contained in:
172
index.html
172
index.html
@@ -944,6 +944,92 @@ PRINT "SHOELACE IS AWESOME"
|
||||
<div class="loader-bg loader-bg-big"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--********************************************************************************************
|
||||
* Switches
|
||||
*********************************************************************************************-->
|
||||
|
||||
<h2 id="switches">
|
||||
<a class="bookmark" href="#switches">#</a>
|
||||
Switches
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
Switches provide an alternative to standard checkboxes. Many people find them more intuitive
|
||||
and easier to use, especially on mobile devices. Shoelace provides a way to create beautiful,
|
||||
animated switches with pure CSS.
|
||||
</p>
|
||||
<p>
|
||||
Because this is a pure CSS solution, there are a couple important things to remember:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
Each switch must have a unique <code>id</code>
|
||||
</li>
|
||||
<li>
|
||||
The <code><label></code> must have a <code>for</code> attribute that references the switch <code>id</code>
|
||||
</li>
|
||||
<li>
|
||||
The <code><label></code> must come <strong>after</strong> the checkbox, otherwise the
|
||||
control won’t render
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
The markup for a switch looks like this:
|
||||
</p>
|
||||
<pre>
|
||||
<span class="switch">
|
||||
<input type="checkbox" class="switch" id="switch-1">
|
||||
<label for="switch-1">Option 1</label>
|
||||
</span>
|
||||
|
||||
<span class="switch">
|
||||
<input type="checkbox" class="switch" id="switch-2" checked>
|
||||
<label for="switch-2">Option 2</label>
|
||||
</span>
|
||||
</pre>
|
||||
<div class="input-single">
|
||||
<span class="switch">
|
||||
<input type="checkbox" class="switch" id="switch-1">
|
||||
<label for="switch-1">Option 1</label>
|
||||
</span>
|
||||
|
||||
<span class="switch">
|
||||
<input type="checkbox" class="switch" id="switch-2" checked>
|
||||
<label for="switch-2">Option 2</label>
|
||||
</span>
|
||||
</div>
|
||||
<p>
|
||||
Use the <code>switch-small</code> and <code>switch-big</code> modifiers to change the size of
|
||||
a switch.
|
||||
</p>
|
||||
<div class="input-single">
|
||||
<span class="switch switch-small">
|
||||
<input type="checkbox" class="switch" id="switch-3">
|
||||
<label for="switch-3">Small</label>
|
||||
</span>
|
||||
|
||||
<span class="switch">
|
||||
<input type="checkbox" class="switch" id="switch-4">
|
||||
<label for="switch-4">Normal</label>
|
||||
</span>
|
||||
|
||||
<span class="switch switch-big">
|
||||
<input type="checkbox" class="switch" id="switch-5">
|
||||
<label for="switch-5">Big</label>
|
||||
</span>
|
||||
</div>
|
||||
<p>
|
||||
Disabled switches are dimmed out. To disable a switch, add the <code>disabled</code> attribute
|
||||
to the checkbox (not the wrapper).
|
||||
</p>
|
||||
<div class="input-single">
|
||||
<span class="switch">
|
||||
<input type="checkbox" class="switch" disabled id="switch-6">
|
||||
<label for="switch-6">Disabled</label>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!--********************************************************************************************
|
||||
* Tabs
|
||||
*********************************************************************************************-->
|
||||
@@ -1172,92 +1258,6 @@ PRINT "SHOELACE IS AWESOME"
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<!--********************************************************************************************
|
||||
* Switches
|
||||
*********************************************************************************************-->
|
||||
|
||||
<h2 id="switches">
|
||||
<a class="bookmark" href="#switches">#</a>
|
||||
Switches
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
Switches provide an alternative to standard checkboxes. Many people find them more intuitive
|
||||
and easier to use, especially on mobile devices. Shoelace provides a way to create beautiful,
|
||||
animated switches with pure CSS.
|
||||
</p>
|
||||
<p>
|
||||
Because this is a pure CSS solution, there are a couple important things to remember:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
Each switch must have a unique <code>id</code>
|
||||
</li>
|
||||
<li>
|
||||
The <code><label></code> must have a <code>for</code> attribute that references the switch <code>id</code>
|
||||
</li>
|
||||
<li>
|
||||
The <code><label></code> must come <strong>after</strong> the checkbox, otherwise the
|
||||
control won’t render
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
The markup for a switch looks like this:
|
||||
</p>
|
||||
<pre>
|
||||
<span class="switch">
|
||||
<input type="checkbox" class="switch" id="switch-1">
|
||||
<label for="switch-1">Option 1</label>
|
||||
</span>
|
||||
|
||||
<span class="switch">
|
||||
<input type="checkbox" class="switch" id="switch-2" checked>
|
||||
<label for="switch-2">Option 2</label>
|
||||
</span>
|
||||
</pre>
|
||||
<div class="input-single">
|
||||
<span class="switch">
|
||||
<input type="checkbox" class="switch" id="switch-1">
|
||||
<label for="switch-1">Option 1</label>
|
||||
</span>
|
||||
|
||||
<span class="switch">
|
||||
<input type="checkbox" class="switch" id="switch-2" checked>
|
||||
<label for="switch-2">Option 2</label>
|
||||
</span>
|
||||
</div>
|
||||
<p>
|
||||
Use the <code>switch-small</code> and <code>switch-big</code> modifiers to change the size of
|
||||
a switch.
|
||||
</p>
|
||||
<div class="input-single">
|
||||
<span class="switch switch-small">
|
||||
<input type="checkbox" class="switch" id="switch-3">
|
||||
<label for="switch-3">Small</label>
|
||||
</span>
|
||||
|
||||
<span class="switch">
|
||||
<input type="checkbox" class="switch" id="switch-4">
|
||||
<label for="switch-4">Normal</label>
|
||||
</span>
|
||||
|
||||
<span class="switch switch-big">
|
||||
<input type="checkbox" class="switch" id="switch-5">
|
||||
<label for="switch-5">Big</label>
|
||||
</span>
|
||||
</div>
|
||||
<p>
|
||||
Disabled switches are dimmed out. To disable a switch, add the <code>disabled</code> attribute
|
||||
to the checkbox (not the wrapper).
|
||||
</p>
|
||||
<div class="input-single">
|
||||
<span class="switch">
|
||||
<input type="checkbox" class="switch" disabled id="switch-6">
|
||||
<label for="switch-6">Disabled</label>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!--********************************************************************************************
|
||||
* Utilities
|
||||
*********************************************************************************************-->
|
||||
|
||||
Reference in New Issue
Block a user