"Toggle checkbox"
Bootstrap 4.1.1 Snippet by webcoderskull

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
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div id="filter-group" class="filter-group">
<ul class='list'>
<li class='list__item'>
<label for='info' class='switch switch--info'>
<input class='switch__input' type="checkbox" id='info' checked />
<div class="switch__box">
<span class="switch__box-inner"></span>
</div>
<p class="switch__desc">Web Coder Skull</p>
</label>
</li>
<li class='list__item'>
<label for='developer' class='switch switch--info'>
<input class='switch__input' type="checkbox" id='developer' />
<div class="switch__box">
<span class="switch__box-inner"></span>
</div>
<p class="switch__desc">Freelance Developer</p>
</label>
</li>
</ul>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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
.list {
list-style: none;
margin: 0;
padding: 20px 10px;
position: relative;
height:auto;
font-size: 10px;
}
.list__item {
padding: 4px 0px;
transition: .3s ease all;
}
.switch {
position: relative;
display: flex;
align-items: center;
cursor: pointer;
}
.switch__input {
opacity: 0;
visibility: hidden;
width: 1px;
height: 1px;
background-color: transparent;
pointer-events: none;
position: absolute;
}
.switch__box {
padding: 3px;
border-radius: 100px;
position: relative;
height: 16px;
width: 30px;
background-color: #bdbdbd;
box-shadow: 0 0 10px transparent;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: