forked from ghinda/css-toggle-switch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.html
356 lines (267 loc) · 10.1 KB
/
bootstrap.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>CSS Toggle Switch: Accessible CSS toggle switch using standard form controls, with Bootstrap</title>
<meta name="description" content="Accessible, screen-reader friendly, CSS-only toggle switches with full keyboard access and mobile support, using standard form controls.">
<meta name="author" content="Ionuț Colceriu">
<!-- Docs styles, not required by the switches -->
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
<link href='http://fonts.googleapis.com/css?family=Roboto:400' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="dist/docs/docs.css">
<!-- Toggle Switch -->
<link rel="stylesheet" href="dist/toggle-switch.css">
<!-- Prism Syntax Highlighter -->
<link rel="stylesheet" href="bower_components/prism/themes/prism.css">
<link rel="stylesheet" href="bower_components/prism/themes/prism-okaidia.css">
<script src="bower_components/prism/prism.js"></script>
</head>
<body>
<header class="row">
<div class="col-lg-7">
<h1>
<a href="index.html">CSS Toggle Switch</a>
</h1>
<p class="description">Accessible CSS toggle switch using standard form controls</p>
</div>
<div class="col-lg-5">
<ul class="list-inline top-menu">
<li><a href="index.html">Standalone</a></li>
<li><a href="bootstrap.html" class="active">Bootstrap</a></li>
<li><a href="foundation.html">Foundation</a></li>
</ul>
</div>
</header>
<div class="row">
<div class="col-lg-12">
<div class="panel hero-box">
<div class="row">
<div class="col-lg-6">
<h4>Light switch</h4>
<p>Use the light switch, instead of a checkbox, for simple <em>“On/Off”</em> options. </p>
<label class="switch-light well" onclick="">
<input type="checkbox">
<span>
Wireless
<span>Off</span>
<span>On</span>
</span>
<a class="btn btn-primary"></a>
</label>
</div>
<div class="col-lg-6">
<h4>Toggle switch</h4>
<p>Use the toggle switches, instead of radio buttons, for two or more, specific options. </p>
<div class="row toggle-demo">
<label class="col-lg-3">View</label>
<div class="switch-toggle switch-3 well col-lg-9">
<input id="week-d1" name="view-d" type="radio" checked>
<label for="week-d1" onclick="">Week</label>
<input id="month-d2" name="view-d" type="radio">
<label for="month-d2" onclick="">Month</label>
<input id="month-d3" name="view-d" type="radio">
<label for="month-d3" onclick="">Year</label>
<a class="btn btn-primary"></a>
</div>
</div>
</div>
</div>
<div class="row dependency-install">
<div class="col-lg-12">
<pre><code><a href="http://bower.io/">bower</a> install --save css-toggle-switch</code></pre>
<pre><code><a href="http://component.io/">component</a> install ghinda/css-toggle-switch</code></pre>
</div>
</div>
<div class="nav-bar hero-actions">
<div class="btn-group btn-group-justified">
<a href="https://github.com/ghinda/css-toggle-switch/archive/gh-pages.zip" class="btn">
<i class="icon-arrow-down"></i>
Download
</a>
<a href="https://github.com/ghinda/css-toggle-switch" class="btn">
<i class="icon-github"></i>
Github
</a>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<h5 class="frameworks text-center">
You can use the switches <a href="index.html">standalone</a>, with <a href="bootstrap.html">Bootstrap</a> or with <a href="foundation.html">Foundation</a>.
</h5>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<h2>Light switch</h2>
<p>Use the light switch, instead of a checkbox, for simple <em>“On/Off”</em> options. </p>
<div class="example col-lg-12">
<label class="switch-light well col-lg-3" onclick="">
<input type="checkbox">
<span>
Wireless
<span>Off</span>
<span>On</span>
</span>
<a class="btn btn-primary"></a>
</label>
<pre><code class="language-markup"><label class="switch-light well" onclick="">
<input type="checkbox">
<span>
Wireless
<span>Off</span>
<span>On</span>
</span>
<a class="btn btn-primary"></a>
</label>
</code></pre>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<h2>Toggle switch</h2>
<p>Use the toggle switches, instead of radio buttons, for two or more specific options. </p>
<div class="example">
<div class="col-lg-5">
<label>View</label>
<div class="switch-toggle well">
<input id="week" name="view" type="radio" checked>
<label for="week" onclick="">Week</label>
<input id="month" name="view" type="radio">
<label for="month" onclick="">Month</label>
<a class="btn btn-primary"></a>
</div>
</div>
<pre><code class="language-markup"><label>View</label>
<div class="switch-toggle well">
<input id="week" name="view" type="radio" checked>
<label for="week" onclick="">Week</label>
<input id="month" name="view" type="radio">
<label for="month" onclick="">Month</label>
<a class="btn btn-primary"></a>
</div>
</code></pre>
</div>
<h3>Multiple options</h3>
<p>You can add up to 5 items by using the <code>.switch-3</code>, <code>.switch-4</code> and <code>.switch-5</code> classes. </p>
<div class="example">
<label>View</label>
<div class="switch-toggle switch-5 well">
<input id="hour3" name="view3" type="radio" checked>
<label for="hour3" onclick="">Hour</label>
<input id="day4" name="view3" type="radio">
<label for="day4" onclick="">Day</label>
<input id="week5" name="view3" type="radio">
<label for="week5" onclick="">Week</label>
<input id="month6" name="view3" type="radio">
<label for="month6" onclick="">Month</label>
<input id="year7" name="view3" type="radio">
<label for="year7" onclick="">Year</label>
<a class="btn btn-primary"></a>
</div>
<pre><code class="language-markup"><label>View</label>
<div class="switch-toggle switch-5 well">
[…]
</code></pre>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<h2>Different looks</h2>
<p>The switches are very flexible, so you can use and combine a number of classes provided by Bootstrap, along with it's grid, to make them look exactly like you need them. </p>
<div class="example">
<div class="row">
<div class="col-lg-4">
<label class="switch-light progress" onclick="">
<input type="checkbox">
<span>
Wireless
<span aria-label="Off" title="Off">O</span>
<span aria-label="On" title="On">I</span>
</span>
<a class="progress-bar"></a>
</label>
</div>
</div>
<div class="row">
<div class="col-lg-4">
<label class="switch-light progress progress-striped active" onclick="">
<input type="checkbox">
<span>
Bluetooth
<span>Off</span>
<span>On</span>
</span>
<a class="progress-bar progress-bar-success"></a>
</label>
</div>
</div>
<div class="row">
<div class="col-lg-4">
<label>View</label>
<div class="switch-toggle well">
<input id="week41" name="view4" type="radio" checked>
<label for="week41" onclick="">Week</label>
<input id="month42" name="view4" type="radio">
<label for="month42" onclick="">Month</label>
<a class="btn btn-primary disabled"></a>
</div>
</div>
</div>
<label>View</label>
<div class="switch-toggle switch-3 alert alert-info">
<input id="week51" name="view5" type="radio" checked>
<label for="week51" onclick="">Week</label>
<input id="month52" name="view5" type="radio">
<label for="month52" onclick="">Month</label>
<input id="month53" name="view5" type="radio">
<label for="month53" onclick="">Year</label>
<a class="btn btn-primary disabled"></a>
</div>
<label>View</label>
<div class="switch-toggle switch-4 alert alert-success">
<input id="week61" name="view6" type="radio" checked>
<label for="week61" onclick="">Week</label>
<input id="month62" name="view6" type="radio">
<label for="month62" onclick="">Month</label>
<input id="year63" name="view6" type="radio">
<label for="year63" onclick="">Year</label>
<input id="decade63" name="view6" type="radio">
<label for="decade63" onclick="">Decade</label>
<a class="btn btn-default"></a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<h3>
<a href="http://getbootstrap.com/" target="_blank">Get Bootstrap.</a>
</h3>
</div>
</div>
<footer>
<div class="row">
<div class="col-lg-12">
<p>
<a href="https://github.com/ghinda/css-toggle-switch">CSS Toggle Switch</a> is a project by <a href="http://ghinda.net">Ionuț Colceriu</a>. Follow <a href="https://twitter.com/ghindas">@ghindas</a>.
</p>
</div>
</div>
</footer>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-19824700-1', 'ghinda.net');
ga('send', 'pageview');
</script>
</body>
</html>