Back

Radio

1 
2<div class="wheel-selector">
3 <div class="hint-pop">TAP TO SPIN</div>
4 <div class="radio-input">
5 <label for="value-2" class="next-trigger" id="trigger-for-1"></label>
6 <label for="value-3" class="next-trigger" id="trigger-for-2"></label>
7 <label for="value-1" class="next-trigger" id="trigger-for-3"></label>
8 
9 <div class="glass-overlay"></div>
10 
11 <input
12 value="value-1"
13 name="value-radio"
14 id="value-1"
15 type="radio"
16 checked=""
17 />
18 <label class="wheel-label" for="value-1" style="--angle: -30deg">
19 <span class="num">01</span>
20 <span class="label">PRIME</span>
21 </label>
22 
23 <input value="value-2" name="value-radio" id="value-2" type="radio" />
24 <label class="wheel-label" for="value-2" style="--angle: 0deg">
25 <span class="num">02</span>
26 <span class="label">SELECT</span>
27 </label>
28 
29 <input value="value-3" name="value-radio" id="value-3" type="radio" />
30 <label class="wheel-label" for="value-3" style="--angle: 30deg">
31 <span class="num">03</span>
32 <span class="label">ULTRA</span>
33 </label>
34 </div>
35</div>
1 
2:root {
3 --accent: #ff3e3e;
4 --panel-bg: #1a1a1a;
5 --wheel-bg: #2a2a2a;
6 --text-active: #ffffff;
7 --text-idle: rgba(255, 255, 255, 0.1);
8}
9 
10.wheel-selector {
11 position: relative;
12 display: flex;
13 justify-content: center;
14 align-items: center;
15}
16.hint-pop {
17 position: absolute;
18 top: -40px;
19 font-family: "Inter", sans-serif;
20 font-weight: 800;
21 font-size: 0.6rem;
22 letter-spacing: 2px;
23 color: #888;
24 text-transform: uppercase;
25 animation: pulseHint 2s infinite ease-in-out;
26 pointer-events: none;
27}
28 
29@keyframes pulseHint {
30 0%,
31 100% {
32 opacity: 0.8;
33 transform: translateY(0);
34 }
35 50% {
36 opacity: 1;
37 transform: translateY(-2px);
38 }
39}
40 
41.radio-input {
42 position: relative;
43 height: 240px;
44 width: 200px;
45 background: #111;
46 border: 2px solid #333;
47 border-radius: 30px;
48 overflow: hidden;
49 display: flex;
50 align-items: center;
51 box-shadow:
52 0 20px 50px rgba(0, 0, 0, 0.5),
53 inset 0 0 10px rgba(0, 0, 0, 0.8);
54}
55 
56.radio-input::after {
57 content: "";
58 position: absolute;
59 right: -150px;
60 width: 300px;
61 height: 300px;
62 background: repeating-conic-gradient(
63 from 0deg,
64 #222 0deg 10deg,
65 #252525 10deg 20deg
66 );
67 border-radius: 50%;
68 z-index: 1;
69 opacity: 0.5;
70}
71.radio-input::before {
72 content: "";
73 position: absolute;
74 left: 15px;
75 top: 50%;
76 transform: translateY(-50%);
77 width: 6px;
78 height: 6px;
79 background: var(--accent);
80 border-radius: 50%;
81 z-index: 30;
82 box-shadow:
83 0 0 15px var(--accent),
84 0 0 30px var(--accent);
85 pointer-events: none;
86}
87 
88.radio-input input {
89 display: none;
90}
91 
92.glass-overlay {
93 position: absolute;
94 inset: 0;
95 background: linear-gradient(
96 135deg,
97 rgba(255, 255, 255, 0.1) 0%,
98 rgba(255, 255, 255, 0) 50%,
99 rgba(0, 0, 0, 0.2) 100%
100 );
101 z-index: 25;
102 pointer-events: none;
103}
104 
105.wheel-label {
106 position: absolute;
107 left: 40px;
108 display: flex;
109 flex-direction: column;
110 transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1);
111 transform-origin: 280px center;
112 transform: rotate(var(--angle));
113 filter: blur(2px);
114 opacity: 0.1;
115 z-index: 5;
116}
117 
118.wheel-label .num {
119 font-family: "Inter", sans-serif;
120 font-weight: 900;
121 font-size: 0.7rem;
122 color: #ff3e3e;
123 margin-bottom: -5px;
124}
125 
126.wheel-label .label {
127 font-family: "Inter", sans-serif;
128 font-weight: 900;
129 font-size: 2.4rem;
130 color: #fff;
131 letter-spacing: -2px;
132 text-transform: uppercase;
133}
134 
135.radio-input:has(#value-1:checked) .wheel-label {
136 transform: rotate(calc(var(--angle) + 30deg));
137}
138.radio-input:has(#value-2:checked) .wheel-label {
139 transform: rotate(calc(var(--angle) + 0deg));
140}
141.radio-input:has(#value-3:checked) .wheel-label {
142 transform: rotate(calc(var(--angle) - 30deg));
143}
144 
145.radio-input input:checked + .wheel-label {
146 opacity: 1;
147 filter: blur(0);
148 transform: rotate(0deg) translateX(10px);
149 z-index: 10;
150}
151 
152.radio-input input:checked + .wheel-label .label {
153 text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
154}
155 
156.next-trigger {
157 position: absolute;
158 inset: 0;
159 z-index: -1;
160 cursor: pointer;
161}
162.radio-input:has(#value-1:checked) #trigger-for-1,
163.radio-input:has(#value-2:checked) #trigger-for-2,
164.radio-input:has(#value-3:checked) #trigger-for-3 {
165 z-index: 100;
166}
167 
168/* I improved the version including brushed metallic textures, inner shadows for a "sunken" wheel look */

MIT License

Copyright © 2026 byllzz (Bilal Malik)


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.