Back

Radio

1 
2<form action="" class="container">
3 <input class="input-btn" type="radio" id="valueIs-1" name="valueIs-radio" checked="" value="valueIs-1">
4 <label class="neon-btn" for="valueIs-1">
5 <span class="span"></span>
6 <span class="txt">OPTION 1</span>
7 </label>
8 
9 <input class="input-btn" type="radio" id="valueIs-2" name="valueIs-radio" value="valueIs-2">
10 <label class="neon-btn" for="valueIs-2">
11 <span class="span"></span>
12 <span class="txt">OPTION 2</span>
13 </label>
14 </form>
1 
2.container {
3 font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
4 font-style: italic;
5 font-weight: bold;
6 font-size: 1.2em;
7 display: grid;
8 gap: 2em;
9 place-content: center;
10 width: 400px;
11}
12 
13.container input[type=radio] {
14 display: none;
15}
16 
17.input-btn:is(:checked) + .neon-btn .span {
18 inset: 2px;
19 background-color: #4090b5;
20 background: repeating-linear-gradient(to bottom, transparent 0%, #4090b5 1px, #4090b5 3px, #4090b5 5px, #4090b5 4px, transparent 0.5%), repeating-linear-gradient(to left, hsl(295, 60%, 12%) 100%, hsl(295, 60%, 12%) 100%);
21 box-shadow: inset 0 40px 20px hsl(296, 59%, 10%);
22}
23 
24.input-btn:is(:checked) + .neon-btn .txt {
25 text-shadow: 2px 4px 1px #9e30a9, 2px 2px 1px #4090b5, 0 0 20px rgba(255, 255, 255, 0.616);
26 color: rgb(255, 255, 255);
27 animation: colorchange 0.3s ease;
28}
29 
30.input-btn:is(:checked) + .neon-btn::before {
31 animation-duration: 0.6s;
32}
33 
34.input-btn:is(:checked) + .neon-btn::after {
35 animation-duration: 0.6s;
36}
37 
38.neon-btn {
39 width: 300px;
40 height: 60px;
41 cursor: pointer;
42 display: flex;
43 justify-content: center;
44 align-items: center;
45 padding: 0.5em 5em;
46 text-align: right;
47 background: transparent;
48 position: relative;
49 overflow: hidden;
50 transition: all 2s ease-in-out;
51 -webkit-clip-path: polygon(6% 0, 93% 0, 100% 8%, 100% 86%, 90% 89%, 88% 100%, 5% 100%, 0% 85%);
52 clip-path: polygon(6% 0, 93% 0, 100% 8%, 100% 86%, 90% 89%, 88% 100%, 5% 100%, 0% 85%);
53}
54 
55.neon-btn .span {
56 display: flex;
57 -webkit-clip-path: polygon(6% 0, 93% 0, 100% 8%, 100% 86%, 90% 89%, 88% 100%, 5% 100%, 0% 85%);
58 clip-path: polygon(6% 0, 93% 0, 100% 8%, 100% 86%, 90% 89%, 88% 100%, 5% 100%, 0% 85%);
59 position: absolute;
60 inset: 1px;
61 background-color: #212121;
62 z-index: 1;
63}
64 
65.neon-btn .txt {
66 text-align: right;
67 position: relative;
68 z-index: 2;
69 color: aliceblue;
70 font-size: 1em;
71 transition: all ease-in-out 2s linear;
72 text-shadow: 0px 0px 1px #4090b5, 0px 0px 1px #9e30a9, 0 0 1px white;
73}
74 
75.neon-btn::before {
76 content: "";
77 position: absolute;
78 height: 300px;
79 aspect-ratio: 1.5/1;
80 box-shadow: -17px -19px 20px #9e30a9;
81 background-image: conic-gradient(#9e30a9, transparent, transparent, transparent, transparent, transparent, transparent, #9e30a9);
82 animation: rotate 4s linear infinite -2s;
83}
84 
85.neon-btn::after {
86 content: "";
87 position: absolute;
88 height: 300px;
89 aspect-ratio: 1.5/1;
90 box-shadow: -17px -19px 10px #4090b5;
91 background-image: conic-gradient(#4090b5, transparent, transparent, transparent, transparent, transparent, transparent, transparent, #4090b5);
92 animation: rotate 4s linear infinite;
93}
94 
95@keyframes rotate {
96 0% {
97 transform: rotate(0deg);
98 }
99 
100 to {
101 transform: rotate(360deg);
102 }
103}
104 
105@keyframes colorchange {
106 0% {
107 text-shadow: 0px 0px 0px #9e30a9, 0px 0px 0px #4090b5, 0 0 0px rgba(255, 255, 255, 0.616);
108 }
109 
110 50% {
111 text-shadow: -6px 5px 1px #9e30a9, 5px 11px 1px #4090b5, 0 0 20px rgba(255, 255, 255, 0.616);
112 }
113 
114 to {
115 text-shadow: 2px 4px 1px #9e30a9, 2px 2px 1px #4090b5, 0 0 20px rgba(255, 255, 255, 0.616);
116 }
117}
118 
119@keyframes backgroundchange {
120 0% {
121 background-color: transparent;
122 }
123 
124 50% {
125 background-color: #4090b5;
126 }
127 
128 to {
129 background-color: transparent;
130 }
131}

MIT License

Copyright © 2026 MijailVillegas (Mijail Friedrich Alexander Villegas Murillo)


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.