Dark Form by codepeek
Zoom
Saved
1 line⌘Z Undo
1<!--2 Author: @codepeek3 License: MIT4 Tags: #dark #form #metal #otp #validation5-->6<form class="sdcf">7 <div class="sdcf__plate">8 <p class="sdcf__box">Box 0412 · Vault B</p>9 <span class="sdcf__lock" aria-hidden="true">10 </span>11 </div>12 <h3 class="sdcf__title">Enter your six-digit code</h3>13 <p class="sdcf__hint">We sent it to the authenticator on your phone.</p>14 <fieldset class="sdcf__wheels">15 <legend class="sdcf__sr">Verification code</legend>16 <input class="sdcf__digit" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder="0" aria-label="Digit 1" autocomplete="one-time-code" required>17 <input class="sdcf__digit" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder="0" aria-label="Digit 2" required>18 <input class="sdcf__digit" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder="0" aria-label="Digit 3" required>19 <input class="sdcf__digit" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder="0" aria-label="Digit 4" required>20 <input class="sdcf__digit" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder="0" aria-label="Digit 5" required>21 <input class="sdcf__digit" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder="0" aria-label="Digit 6" required>22 </fieldset>23 <div class="sdcf__row">24 <button class="sdcf__open" type="submit">Open box</button>25 <button class="sdcf__resend" type="button">Resend code</button>26 </div>27</form>
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
<!--
Author: @codepeek
License: MIT
Tags: #dark #form #metal #otp #validation
-->
<form class="sdcf">
<div class="sdcf__plate">
<p class="sdcf__box">Box 0412 · Vault B</p>
<span class="sdcf__lock" aria-hidden="true">
</span>
</div>
<h3 class="sdcf__title">Enter your six-digit code</h3>
<p class="sdcf__hint">We sent it to the authenticator on your phone.</p>
<fieldset class="sdcf__wheels">
<legend class="sdcf__sr">Verification code</legend>
<input class="sdcf__digit" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder="0" aria-label="Digit 1" autocomplete="one-time-code" required>
<input class="sdcf__digit" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder="0" aria-label="Digit 2" required>
<input class="sdcf__digit" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder="0" aria-label="Digit 3" required>
<input class="sdcf__digit" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder="0" aria-label="Digit 4" required>
<input class="sdcf__digit" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder="0" aria-label="Digit 5" required>
<input class="sdcf__digit" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder="0" aria-label="Digit 6" required>
</fieldset>
<div class="sdcf__row">
<button class="sdcf__open" type="submit">Open box</button>
<button class="sdcf__resend" type="button">Resend code</button>
</div>
</form>1/* * Author: @codepeek * License: MIT * Tags: #dark #form #metal #otp #validation */2.sdcf {3 width: 320px;4 padding: 16px 18px 18px;5 box-sizing: border-box;6 border-radius: 12px;7 background: radial-gradient(circle at 10px 10px, #8a9096 0 2.5px, transparent 3px), radial-gradient(circle at calc(100% - 10px) 10px, #8a9096 0 2.5px, transparent 3px), radial-gradient(circle at 10px calc(100% - 10px), #8a9096 0 2.5px, transparent 3px), radial-gradient(circle at calc(100% - 10px) calc(100% - 10px), #8a9096 0 2.5px, transparent 3px), repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px), linear-gradient(160deg, #3a3d40, #232527 60%, #2e3134);8 color: #e8e4dc;9 font-family: Inter, system-ui, sans-serif;10 box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 1px #111, 0 24px 40px -20px rgba(0, 0, 0, 0.9);11}12.sdcf__plate {13 display: flex;14 align-items: center;15 justify-content: space-between;16 margin: 0 8px 14px;17 padding: 7px 10px;18 border-radius: 3px;19 background: linear-gradient(#e3c98f, #b58a3c);20 color: #3a2a0c;21 box-shadow: inset 0 1px 0 rgba(255, 245, 215, 0.8), 0 1px 2px rgba(0, 0, 0, 0.6);22}23.sdcf__box {24 margin: 0;25 font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;26 letter-spacing: 0.18em;27 text-transform: uppercase;28}29.sdcf__lock {30 display: flex;31 align-items: center;32 gap: 6px;33 font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;34 letter-spacing: 0.14em;35 text-transform: uppercase;36}37.sdcf__lock::before {38 content: "";39 width: 7px;40 height: 7px;41 border-radius: 50%;42 background: #c8242f;43 box-shadow: 0 0 6px #c8242f;44}45.sdcf__lock::after {46 content: "Locked";47}48.sdcf:not(:has(:invalid)) .sdcf__lock::before {49 background: #3fbf6a;50 box-shadow: 0 0 6px #3fbf6a;51}52.sdcf:not(:has(:invalid)) .sdcf__lock::after {53 content: "Ready";54}55.sdcf__title {56 margin: 0 8px;57 font-size: 16px;58 font-weight: 700;59}60.sdcf__hint {61 margin: 4px 8px 14px;62 color: #9da3a8;63 font-size: 12px;64}65.sdcf__wheels {66 display: flex;67 justify-content: center;68 gap: 7px;69 margin: 0;70 padding: 0;71 border: 0;72}73.sdcf__sr {74 position: absolute;75 width: 1px;76 height: 1px;77 margin: -1px;78 padding: 0;79 overflow: hidden;80 clip-path: inset(50%);81 white-space: nowrap;82 border: 0;83}84.sdcf__digit {85 width: 38px;86 height: 50px;87 padding: 0;88 box-sizing: border-box;89 border: 2px solid #b58a3c;90 border-radius: 6px;91 background: linear-gradient(#0c0d0e, #1d1f21 50%, #0c0d0e);92 color: #f1d48c;93 font: 700 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace;94 text-align: center;95 caret-color: #f1d48c;96 outline: none;97 box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.1);98 transition: border-color 160ms ease, box-shadow 200ms ease, transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);99}100.sdcf__digit::placeholder {101 color: #3d4246;102}103.sdcf__digit:focus {104 border-color: #f1d48c;105 transform: translateY(-2px);106 box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.9), 0 0 0 3px rgba(241, 212, 140, 0.25);107}108.sdcf__digit:valid {109 background: linear-gradient(#2a2210, #3d3218 50%, #2a2210);110 text-shadow: 0 0 8px rgba(241, 212, 140, 0.7);111}112.sdcf__row {113 display: flex;114 gap: 8px;115 margin-top: 18px;116}117.sdcf__open, .sdcf__resend {118 height: 38px;119 border-radius: 6px;120 font: 600 13px/1 Inter, system-ui, sans-serif;121 cursor: pointer;122 transition: transform 120ms ease, filter 160ms ease;123}124.sdcf__open {125 flex: 1;126 border: 0;127 background: linear-gradient(#e3c98f, #b58a3c);128 color: #2a1f08;129 box-shadow: inset 0 1px 0 rgba(255, 245, 215, 0.8), 0 3px 0 #6b4f1d;130}131.sdcf__open:hover {132 filter: brightness(1.08);133}134.sdcf__open:active {135 transform: translateY(2px);136 box-shadow: inset 0 1px 0 rgba(255, 245, 215, 0.8), 0 1px 0 #6b4f1d;137}138.sdcf__resend {139 padding: 0 12px;140 border: 1px solid #4a4f54;141 background: transparent;142 color: #c9ced2;143}144.sdcf__resend:hover {145 border-color: #b58a3c;146}147.sdcf__open:focus-visible, .sdcf__resend:focus-visible {148 outline: 2px solid #f1d48c;149 outline-offset: 3px;150}151@media (prefers-reduced-motion: reduce) {152 .sdcf__digit {153 transition: none;154 }155}
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/* * Author: @codepeek * License: MIT * Tags: #dark #form #metal #otp #validation */
.sdcf {
width: 320px;
padding: 16px 18px 18px;
box-sizing: border-box;
border-radius: 12px;
background: radial-gradient(circle at 10px 10px, #8a9096 0 2.5px, transparent 3px), radial-gradient(circle at calc(100% - 10px) 10px, #8a9096 0 2.5px, transparent 3px), radial-gradient(circle at 10px calc(100% - 10px), #8a9096 0 2.5px, transparent 3px), radial-gradient(circle at calc(100% - 10px) calc(100% - 10px), #8a9096 0 2.5px, transparent 3px), repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px), linear-gradient(160deg, #3a3d40, #232527 60%, #2e3134);
color: #e8e4dc;
font-family: Inter, system-ui, sans-serif;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 1px #111, 0 24px 40px -20px rgba(0, 0, 0, 0.9);
}
.sdcf__plate {
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 8px 14px;
padding: 7px 10px;
border-radius: 3px;
background: linear-gradient(#e3c98f, #b58a3c);
color: #3a2a0c;
box-shadow: inset 0 1px 0 rgba(255, 245, 215, 0.8), 0 1px 2px rgba(0, 0, 0, 0.6);
}
.sdcf__box {
margin: 0;
font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
letter-spacing: 0.18em;
text-transform: uppercase;
}
.sdcf__lock {
display: flex;
align-items: center;
gap: 6px;
font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
letter-spacing: 0.14em;
text-transform: uppercase;
}
.sdcf__lock::before {
content: "";
width: 7px;
height: 7px;
border-radius: 50%;
background: #c8242f;
box-shadow: 0 0 6px #c8242f;
}
.sdcf__lock::after {
content: "Locked";
}
.sdcf:not(:has(:invalid)) .sdcf__lock::before {
background: #3fbf6a;
box-shadow: 0 0 6px #3fbf6a;
}
.sdcf:not(:has(:invalid)) .sdcf__lock::after {
content: "Ready";
}
.sdcf__title {
margin: 0 8px;
font-size: 16px;
font-weight: 700;
}
.sdcf__hint {
margin: 4px 8px 14px;
color: #9da3a8;
font-size: 12px;
}
.sdcf__wheels {
display: flex;
justify-content: center;
gap: 7px;
margin: 0;
padding: 0;
border: 0;
}
.sdcf__sr {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
.sdcf__digit {
width: 38px;
height: 50px;
padding: 0;
box-sizing: border-box;
border: 2px solid #b58a3c;
border-radius: 6px;
background: linear-gradient(#0c0d0e, #1d1f21 50%, #0c0d0e);
color: #f1d48c;
font: 700 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
text-align: center;
caret-color: #f1d48c;
outline: none;
box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.1);
transition: border-color 160ms ease, box-shadow 200ms ease, transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sdcf__digit::placeholder {
color: #3d4246;
}
.sdcf__digit:focus {
border-color: #f1d48c;
transform: translateY(-2px);
box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.9), 0 0 0 3px rgba(241, 212, 140, 0.25);
}
.sdcf__digit:valid {
background: linear-gradient(#2a2210, #3d3218 50%, #2a2210);
text-shadow: 0 0 8px rgba(241, 212, 140, 0.7);
}
.sdcf__row {
display: flex;
gap: 8px;
margin-top: 18px;
}
.sdcf__open, .sdcf__resend {
height: 38px;
border-radius: 6px;
font: 600 13px/1 Inter, system-ui, sans-serif;
cursor: pointer;
transition: transform 120ms ease, filter 160ms ease;
}
.sdcf__open {
flex: 1;
border: 0;
background: linear-gradient(#e3c98f, #b58a3c);
color: #2a1f08;
box-shadow: inset 0 1px 0 rgba(255, 245, 215, 0.8), 0 3px 0 #6b4f1d;
}
.sdcf__open:hover {
filter: brightness(1.08);
}
.sdcf__open:active {
transform: translateY(2px);
box-shadow: inset 0 1px 0 rgba(255, 245, 215, 0.8), 0 1px 0 #6b4f1d;
}
.sdcf__resend {
padding: 0 12px;
border: 1px solid #4a4f54;
background: transparent;
color: #c9ced2;
}
.sdcf__resend:hover {
border-color: #b58a3c;
}
.sdcf__open:focus-visible, .sdcf__resend:focus-visible {
outline: 2px solid #f1d48c;
outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
.sdcf__digit {
transition: none;
}
}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.
◉ 2 views
Build it with AIA ready prompt with the code, the credit and how to adapt it to your project.
A two-factor form set into a brushed steel deposit box door, with six brass-rimmed digit windows. Each window lights up as you type and the lock lamp turns from red to green when the code is complete.
Choose where to donate
Select a platform to continue.
Community
Comments 0
Code copied
SUPPORT THE CREATOR
Would you like to donate to the creator to help them keep creating content?
You need to sign in before you can write a comment.