Back

Checkbox

1<input id="inpLock" type="checkbox">
2<label class="btn-lock" for="inpLock">
3 <svg width="36" height="40" viewBox="0 0 36 40">
4 <path class="lockb" d="M27 27C27 34.1797 21.1797 40 14 40C6.8203 40 1 34.1797 1 27C1 19.8203 6.8203 14 14 14C21.1797 14 27 19.8203 27 27ZM15.6298 26.5191C16.4544 25.9845 17 25.056 17 24C17 22.3431 15.6569 21 14 21C12.3431 21 11 22.3431 11 24C11 25.056 11.5456 25.9845 12.3702 26.5191L11 32H17L15.6298 26.5191Z"></path>
5 <path class="lock" d="M6 21V10C6 5.58172 9.58172 2 14 2V2C18.4183 2 22 5.58172 22 10V21"></path>
6 <path class="bling" d="M29 20L31 22"></path>
7 <path class="bling" d="M31.5 15H34.5"></path>
8 <path class="bling" d="M29 10L31 8"></path>
9 </svg>
10</label>
1.btn-lock {
2 position: absolute;
3 top: calc(50% - 32px);
4 left: calc(50% - 32px);
5 display: inline-block;
6 background: #ff5b5b;
7 width: 64px;
8 height: 64px;
9 box-sizing: border-box;
10 padding: 12px 0 0 18px;
11 border-radius: 50%;
12 cursor: pointer;
13 -webkit-tap-highlight-color: transparent;
14}
15 
16.btn-lock svg {
17 fill: none;
18 transform: translate3d(0, 0, 0);
19}
20 
21.btn-lock svg .bling {
22 stroke: #fff;
23 stroke-width: 2.5;
24 stroke-linecap: round;
25 stroke-dasharray: 3;
26 stroke-dashoffset: 15;
27 transition: all 0.3s ease;
28}
29 
30.btn-lock svg .lock {
31 stroke: #fff;
32 stroke-width: 4;
33 stroke-linejoin: round;
34 stroke-linecap: round;
35 stroke-dasharray: 36;
36 transition: all 0.4s ease;
37}
38 
39.btn-lock svg .lockb {
40 fill: #fff;
41 fill-rule: evenodd;
42 clip-rule: evenodd;
43 transform: rotate(8deg);
44 transform-origin: 14px 20px;
45 transition: all 0.2s ease;
46}
47 
48#inpLock {
49 display: none;
50}
51 
52#inpLock:checked + label {
53 background: #20cca5;
54}
55 
56#inpLock:checked + label svg {
57 opacity: 1;
58}
59 
60#inpLock:checked + label svg .bling {
61 animation: bling6132 0.3s linear forwards;
62 animation-delay: 0.2s;
63}
64 
65#inpLock:checked + label svg .lock {
66 stroke-dasharray: 48;
67 animation: locked 0.3s linear forwards;
68}
69 
70#inpLock:checked + label svg .lockb {
71 transform: rotate(0);
72 transform-origin: 14px 22px;
73}
74 
75@keyframes bling6132 {
76 50% {
77 stroke-dasharray: 3;
78 stroke-dashoffset: 12;
79 }
80 
81 100% {
82 stroke-dasharray: 3;
83 stroke-dashoffset: 9;
84 }
85}
86 
87@keyframes locked {
88 50% {
89 transform: translateY(1px);
90 }
91}

MIT License

Copyright © 2026 mobinkakei (Mobeen)


Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.