-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsliders.html
278 lines (239 loc) · 7.5 KB
/
sliders.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Lazy Kit Sliders</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="A new design system for developing with less effort.">
<meta name="author" content="BootstrapBay">
<link href="assets/img/favicon.ico" rel="icon" type="image/png">
<link rel="stylesheet" href="../assets/vendor/bootstrap/bootstrap.min.css">
<link rel="stylesheet" href="../assets/css/lazy.css">
<link rel="stylesheet" href="../assets/vendor/prism/prism.css">
<link rel="stylesheet" href="../assets/css/demo.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.0/css/all.css" integrity="sha384-aOkxzJ5uQz7WBObEZcHvV5JvRW3TUc2rNPA7pe3AwnsUohiw1Vj2Rgx2KSOkF5+h" crossorigin="anonymous">
</head>
<body class="documentation language-html">
<nav class="navbar navbar-expand-md navbar-dark bg-primary mb-4 fixed-top">
<a class="navbar-brand d-flex align-items-center" href="#"><img src="../assets/img/logo_white.svg" alt="Example Navbar 1" class="mr-1 ml-2" height="30"> Lazy Kit</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown-3" aria-controls="navbarNavDropdown-3"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse mr-auto" id="navbarNavDropdown-3">
<ul class="navbar-nav ml-auto text-center">
<li class="nav-item mr-2">
<a class="btn btn-outline-light" href="/index.html">
Live Preview
</a>
</li>
<li class="nav-item">
<a class="btn btn-light" href="#">
Download
</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid">
<div class="row">
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
<div class="sidebar-sticky">
<h6 class="sidebar-heading">Introduction</h6>
<ul class="nav flex-column">
<li class="nav-item">
<a href="getting_started.html" class="nav-link" >
Getting Started
</a>
</li>
<li class="nav-item">
<a href="license.html" class="nav-link" >
License
</a>
</li>
<li class="nav-item">
<a href="contents.html" class="nav-link" >
Contents
</a>
</li>
</ul>
<h6 class="sidebar-heading core">Components</h6>
<ul class="nav flex-column">
<li class="nav-item">
<a href="alerts.html" class="nav-link" >
Alerts
</a>
</li>
<li class="nav-item">
<a href="badges.html" class="nav-link" >
Badges
</a>
</li>
<li class="nav-item">
<a href="buttons.html" class="nav-link" >
Buttons
</a>
</li>
<li class="nav-item">
<a href="cards.html" class="nav-link" >
Cards
</a>
</li>
<li class="nav-item">
<a href="dropdowns.html" class="nav-link" >
Dropdowns
</a>
</li>
<li class="nav-item">
<a href="font_awesome.html" class="nav-link" >
Font Awesome
</a>
</li>
<li class="nav-item">
<a href="forms.html" class="nav-link" >
Forms
</a>
</li>
<li class="nav-item">
<a href="grid_layout.html" class="nav-link" >
Grid & Layout
</a>
</li>
<li class="nav-item">
<a href="modals.html" class="nav-link" >
Modals
</a>
</li>
<li class="nav-item">
<a href="navbars.html" class="nav-link" >
Navbar
</a>
</li>
<li class="nav-item">
<a href="navs.html" class="nav-link" >
Navs
</a>
</li>
<li class="nav-item">
<a href="pagination.html" class="nav-link" >
Pagination
</a>
</li>
<li class="nav-item">
<a href="progress_bars.html" class="nav-link" >
Progress Bars
</a>
</li>
<li class="nav-item">
<a href="sliders.html" class="nav-link" >
Sliders
</a>
</li>
<li class="nav-item">
<a href="tooltips_popovers.html" class="nav-link" >
Tooltips & Popovers
</a>
</li>
<li class="nav-item">
<a href="typography.html" class="nav-link" >
Typography
</a>
</li>
</ul>
<h6 class="sidebar-heading core">Help & Support</h6>
<ul class="nav flex-column">
<li class="nav-item">
<a href="credits.html" class="nav-link" >
Credits
</a>
</li>
<li class="nav-item">
<a href="support.html" class="nav-link" >
Support
</a>
</li>
</ul>
</div>
</nav>
<div class="col-md-8 offset-md-2 content">
<h2>Sliders</h2>
<p>
The Lazy Kit sliders are based on the NoUiSlider library. In order to use them, you need to specifically import the <code>nouislider.js</code> in your file.
</p>
<p>
To create a basic slider you need a <code><div></code> with an id that you can use to select it and initialize the slider plugin.
</p>
<div class="component">
<!-- html -->
<div class="wrapper">
<div id="demo-slider"></div>
</div>
</div>
<pre><code><!-- html -->
<div class="wrapper">
<div id="demo-slider"></div>
</div>
// javascript
var slider = document.getElementById('demo-slider');
noUiSlider.create(slider, {
start: '20',
connect: [true, false],
range: {
'min': 0,
'max': 100
}
});
</code></pre>
<div class="space"></div>
<h4>Multiple Handles</h4>
<p>You can add multiple handles to the slider by adding multiple values to the <code>start</code> option; one value for where each handle should start.</p>
<div class="component">
<!-- html -->
<div class="wrapper">
<div id="demo-slider-handles"></div>
</div>
</div>
<pre><code><!-- html -->
<div class="wrapper">
<div id="demo-slider-handles"></div>
</div>
// javascript
var slider_handles = document.getElementById('demo-slider-handles');
noUiSlider.create(slider_handles, {
start: ['20', '40'],
connect: !0,
range: {
'min': 0,
'max': 100
}
});
</code></pre>
<br / />
<p>
For more details on the available configuration options make sure you check out <a href="https://refreshless.com/nouislider/" target="_blank">the official noUiSlider documentation</a>.
</p>
<div class="d-flex justify-content-between mt-5">
<div class="prev">
<a class="btn btn-outline-primary" href="progress_bars.html"><i class="fas fa-arrow-left"></i> Previous</a>
</div>
<div class="next">
<a class="btn btn-outline-primary" href="tooltips_popovers.html">Next <i class="fas fa-arrow-right"></i></a>
</div>
</div>
</div>
</div>
</div>
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="../assets/vendor/jquery/jquery.min.js"></script>
<script src="../assets/vendor/popper/popper.min.js"></script>
<script src="../assets/vendor/bootstrap/bootstrap.min.js" ></script>
<!-- optional plugins -->
<script src="../assets/vendor/nouislider/js/nouislider.min.js"></script>
<!-- prism for code documentation -->
<script src="../assets/vendor/prism/prism.js"></script>
<!-- lazy javascript -->
<script src="../assets/js/lazy.js"></script>
<script src="../assets/js/demo.js"></script>
</body>
</html>