Glow Toggle Switch by elijahgummer
Zoom
Saved
1 line⌘Z Undo
1<!--2 Author: elijahgummer3 Source: https://uiverse.io/elijahgummer/shy-fireant-54 License: MIT5 Tags: #glow #gradient #hover-effect #modern #simple #switch #uiverse6-->7<a href="#" class="square">8 <div class="burgerwrap">9 <span>10 </span>11 <span>12 </span>13 <span>14 </span>15 </div>16</a>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!--
Author: elijahgummer
Source: https://uiverse.io/elijahgummer/shy-fireant-5
License: MIT
Tags: #glow #gradient #hover-effect #modern #simple #switch #uiverse
-->
<a href="#" class="square">
<div class="burgerwrap">
<span>
</span>
<span>
</span>
<span>
</span>
</div>
</a>1/* * Author: elijahgummer * Source: https://uiverse.io/elijahgummer/shy-fireant-5 * License: MIT * Tags: #glow #gradient #hover-effect #modern #simple #switch #uiverse */2/* * From Uiverse.io by elijahgummer - https://uiverse.io/elijahgummer/shy-fireant-5 * MIT License - Copyright (c) 2023 Uiverse.io and its contributors * https://github.com/uiverse-io/galaxy/blob/main/LICENSE */3.square {4 border: 1px solid #5e42a6;5 height: 26px;6 width: 26px;7 display: block;8 margin: 40px auto;9 transform: rotate(45deg);10 overflow: hidden;11 cursor: pointer;12 -webkit-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);13 -moz-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);14 -o-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);15 transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);16 /* custom */17}18.square .burgerwrap {19 height: 18px;20 width: 21px;21 transform: rotate(-45deg);22 padding-left: 2px;23 padding-top: 8px;24 -webkit-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);25 -moz-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);26 -o-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);27 transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);28 /* custom */29}30.square:hover {31 transform: rotate(135deg);32 border: 1px solid #fff;33 box-shadow: 0 0 2px rgba(255, 255, 255, 0.5), 0 0 5px rgba(255, 255, 255, 0.5), 0 0 20px rgba(255, 255, 255, 0.5), 0 0 30px rgba(255, 255, 255, 0.5), 0 0 40px rgba(255, 255, 255, 0.5), 0 0 50px rgba(255, 255, 255, 0.5), 0 0 60px rgba(255, 255, 255, 0.5);34}35.square:hover .burgerwrap {36 transform: rotate(-135deg);37}38.square span {39 height: 2px;40 width: 14px;41 background: linear-gradient(145deg, #5e42a6, #b46be4);42 display: block;43 margin-bottom: 2px;44 -webkit-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);45 -moz-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);46 -o-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);47 transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);48 /* custom */49}50.square span:after {51 content: "";52 height: 2px;53 width: 14px;54 position: absolute;55 background: #fff;56 left: -22px;57 margin-top: -4px;58 -webkit-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);59 -moz-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);60 -o-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);61 transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);62 /* custom */63}64.square:hover span {65 margin-left: 26px;66}67.square:hover span:after {68 left: 0.2px;69}70.square span:nth-of-type(1), .square span:nth-of-type(1):after {71 transition-delay: 0.1s;72}73.square span:nth-of-type(2), .square span:nth-of-type(2):after {74 transition-delay: 0.2s;75}76.square span:nth-of-type(3), .square span:nth-of-type(3):after {77 transition-delay: 0.3s;78}
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
/* * Author: elijahgummer * Source: https://uiverse.io/elijahgummer/shy-fireant-5 * License: MIT * Tags: #glow #gradient #hover-effect #modern #simple #switch #uiverse */
/* * From Uiverse.io by elijahgummer - https://uiverse.io/elijahgummer/shy-fireant-5 * MIT License - Copyright (c) 2023 Uiverse.io and its contributors * https://github.com/uiverse-io/galaxy/blob/main/LICENSE */
.square {
border: 1px solid #5e42a6;
height: 26px;
width: 26px;
display: block;
margin: 40px auto;
transform: rotate(45deg);
overflow: hidden;
cursor: pointer;
-webkit-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
-moz-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
-o-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
/* custom */
}
.square .burgerwrap {
height: 18px;
width: 21px;
transform: rotate(-45deg);
padding-left: 2px;
padding-top: 8px;
-webkit-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
-moz-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
-o-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
/* custom */
}
.square:hover {
transform: rotate(135deg);
border: 1px solid #fff;
box-shadow: 0 0 2px rgba(255, 255, 255, 0.5), 0 0 5px rgba(255, 255, 255, 0.5), 0 0 20px rgba(255, 255, 255, 0.5), 0 0 30px rgba(255, 255, 255, 0.5), 0 0 40px rgba(255, 255, 255, 0.5), 0 0 50px rgba(255, 255, 255, 0.5), 0 0 60px rgba(255, 255, 255, 0.5);
}
.square:hover .burgerwrap {
transform: rotate(-135deg);
}
.square span {
height: 2px;
width: 14px;
background: linear-gradient(145deg, #5e42a6, #b46be4);
display: block;
margin-bottom: 2px;
-webkit-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
-moz-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
-o-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
/* custom */
}
.square span:after {
content: "";
height: 2px;
width: 14px;
position: absolute;
background: #fff;
left: -22px;
margin-top: -4px;
-webkit-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
-moz-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
-o-transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
transition: all 500ms cubic-bezier(0.97, 0, 0.395, 0.995);
/* custom */
}
.square:hover span {
margin-left: 26px;
}
.square:hover span:after {
left: 0.2px;
}
.square span:nth-of-type(1), .square span:nth-of-type(1):after {
transition-delay: 0.1s;
}
.square span:nth-of-type(2), .square span:nth-of-type(2):after {
transition-delay: 0.2s;
}
.square span:nth-of-type(3), .square span:nth-of-type(3):after {
transition-delay: 0.3s;
}Changes made here are only a live preview and will not be saved.
Save to GitHub
GitHub opens a new file in your repository with this element filled in. Review it there and press Commit changes. Nothing is sent from codepeek and no GitHub access is needed.
◉ 3 views
Build it with AIA ready prompt with the code, the credit and how to adapt it to your project.
Gradient toggle switch created by elijahgummer on Uiverse.io. Open source under the MIT license.
Community
You need to sign in before you can write a comment.