Dark Input by codepeek
Zoom
Saved
1 line⌘Z Undo
1<!--2 Author: @codepeek3 License: MIT4 Tags: #dark #form #keyboard #mono #retro5-->6<fieldset class="pcf">7 <legend class="pcf__legend">Code sent to ••• 0412</legend>8 <div class="pcf__lcd">9 <span class="pcf__cell">10 <input class="pcf__d" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder=" " required aria-label="Digit 1 of 6" autocomplete="one-time-code">11 </span>12 <span class="pcf__cell">13 <input class="pcf__d" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder=" " required aria-label="Digit 2 of 6">14 </span>15 <span class="pcf__cell">16 <input class="pcf__d" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder=" " required aria-label="Digit 3 of 6">17 </span>18 <span class="pcf__cell">19 <input class="pcf__d" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder=" " required aria-label="Digit 4 of 6">20 </span>21 <span class="pcf__cell">22 <input class="pcf__d" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder=" " required aria-label="Digit 5 of 6">23 </span>24 <span class="pcf__cell">25 <input class="pcf__d" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder=" " required aria-label="Digit 6 of 6">26 </span>27 </div>28 <p class="pcf__status" aria-hidden="true">29 </p>30</fieldset>
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
<!--
Author: @codepeek
License: MIT
Tags: #dark #form #keyboard #mono #retro
-->
<fieldset class="pcf">
<legend class="pcf__legend">Code sent to ••• 0412</legend>
<div class="pcf__lcd">
<span class="pcf__cell">
<input class="pcf__d" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder=" " required aria-label="Digit 1 of 6" autocomplete="one-time-code">
</span>
<span class="pcf__cell">
<input class="pcf__d" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder=" " required aria-label="Digit 2 of 6">
</span>
<span class="pcf__cell">
<input class="pcf__d" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder=" " required aria-label="Digit 3 of 6">
</span>
<span class="pcf__cell">
<input class="pcf__d" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder=" " required aria-label="Digit 4 of 6">
</span>
<span class="pcf__cell">
<input class="pcf__d" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder=" " required aria-label="Digit 5 of 6">
</span>
<span class="pcf__cell">
<input class="pcf__d" inputmode="numeric" maxlength="1" pattern="[0-9]" placeholder=" " required aria-label="Digit 6 of 6">
</span>
</div>
<p class="pcf__status" aria-hidden="true">
</p>
</fieldset>1/* * Author: @codepeek * License: MIT * Tags: #dark #form #keyboard #mono #retro */2.pcf {3 counter-reset: pcf-n;4 margin: 0;5 padding: 16px 18px 14px;6 min-width: 0;7 width: 320px;8 box-sizing: border-box;9 border: 0;10 border-radius: 20px;11 background: linear-gradient(160deg, #343434, #1c1c1c);12 box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1), inset 0 -3px 0 rgb(0 0 0 / 0.5), 0 20px 30px -12px rgb(0 0 0 / 0.75);13 color: #bdb6a8;14 font-family: ui-monospace, SFMono-Regular, Menlo, monospace;15}16.pcf__legend {17 float: left;18 width: 100%;19 padding: 0;20 margin-bottom: 10px;21 font-size: 11px;22 letter-spacing: 0.12em;23 text-transform: uppercase;24}25.pcf__lcd {26 clear: both;27 display: grid;28 grid-template-columns: repeat(6, 1fr);29 gap: 6px;30 padding: 12px;31 border-radius: 6px;32 background: repeating-linear-gradient(0deg, rgb(0 0 0 / 0.045) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgb(0 0 0 / 0.045) 0 1px, transparent 1px 3px), linear-gradient(#b5c086, #9aa86a);33 box-shadow: inset 0 2px 6px rgb(0 0 0 / 0.45), 0 0 0 3px #111, 0 1px 0 4px #3a3a3a;34}35.pcf__cell {36 position: relative;37 height: 50px;38 border-radius: 3px;39 transition: background 0.2s;40}41.pcf__cell::before {42 content: "8";43 position: absolute;44 inset: 0;45 display: grid;46 place-items: center;47 color: rgb(31 42 20 / 0.12);48 font: 700 32px/1 ui-monospace, SFMono-Regular, Menlo, monospace;49 pointer-events: none;50 transition: opacity 0.15s;51}52.pcf__cell:has(.pcf__d:valid) {53 counter-increment: pcf-n;54}55.pcf__cell:has(.pcf__d:valid)::before {56 opacity: 0;57}58.pcf__d {59 position: relative;60 width: 100%;61 height: 100%;62 padding: 0;63 border: 0;64 border-radius: 3px;65 background: transparent;66 color: #1f2a14;67 font: 700 32px/1 ui-monospace, SFMono-Regular, Menlo, monospace;68 text-align: center;69 caret-color: transparent;70 outline: none;71}72.pcf__cell:has(.pcf__d:focus) {73 background: rgb(31 42 20 / 0.1);74 box-shadow: inset 0 -3px 0 #1f2a14;75}76.pcf__cell:has(.pcf__d:focus:placeholder-shown)::after {77 content: "";78 position: absolute;79 left: 50%;80 top: 12px;81 width: 14px;82 height: 26px;83 margin-left: -7px;84 background: #1f2a14;85 animation: pcf-blink 1s steps(1) infinite;86}87.pcf__d:not(:placeholder-shown):invalid {88 color: #7a1d16;89 animation: pcf-shake 0.3s;90}91.pcf__status {92 display: flex;93 align-items: center;94 gap: 8px;95 margin: 12px 2px 0;96 font-size: 11px;97 letter-spacing: 0.06em;98}99.pcf__status::before {100 content: "";101 width: 7px;102 height: 7px;103 border-radius: 50%;104 background: #5a3a1a;105}106.pcf__status::after {107 content: counter(pcf-n) " of 6 digits";108}109.pcf:not(:has(.pcf__d:invalid)) .pcf__status::before {110 background: #a8e08a;111 box-shadow: 0 0 8px #a8e08a;112}113.pcf:not(:has(.pcf__d:invalid)) .pcf__status::after {114 content: "Code complete · press Enter";115 color: #e8e2d6;116}117@keyframes pcf-blink {118 50% {119 opacity: 0;120 }121}122@keyframes pcf-shake {123 25% {124 transform: translateX(-3px);125 }126 75% {127 transform: translateX(3px);128 }129}130@media (prefers-reduced-motion: reduce) {131 .pcf__cell:has(.pcf__d:focus:placeholder-shown)::after, .pcf__d:not(:placeholder-shown):invalid {132 animation: none;133 }134}
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
/* * Author: @codepeek * License: MIT * Tags: #dark #form #keyboard #mono #retro */
.pcf {
counter-reset: pcf-n;
margin: 0;
padding: 16px 18px 14px;
min-width: 0;
width: 320px;
box-sizing: border-box;
border: 0;
border-radius: 20px;
background: linear-gradient(160deg, #343434, #1c1c1c);
box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1), inset 0 -3px 0 rgb(0 0 0 / 0.5), 0 20px 30px -12px rgb(0 0 0 / 0.75);
color: #bdb6a8;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.pcf__legend {
float: left;
width: 100%;
padding: 0;
margin-bottom: 10px;
font-size: 11px;
letter-spacing: 0.12em;
text-transform: uppercase;
}
.pcf__lcd {
clear: both;
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 12px;
border-radius: 6px;
background: repeating-linear-gradient(0deg, rgb(0 0 0 / 0.045) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgb(0 0 0 / 0.045) 0 1px, transparent 1px 3px), linear-gradient(#b5c086, #9aa86a);
box-shadow: inset 0 2px 6px rgb(0 0 0 / 0.45), 0 0 0 3px #111, 0 1px 0 4px #3a3a3a;
}
.pcf__cell {
position: relative;
height: 50px;
border-radius: 3px;
transition: background 0.2s;
}
.pcf__cell::before {
content: "8";
position: absolute;
inset: 0;
display: grid;
place-items: center;
color: rgb(31 42 20 / 0.12);
font: 700 32px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
pointer-events: none;
transition: opacity 0.15s;
}
.pcf__cell:has(.pcf__d:valid) {
counter-increment: pcf-n;
}
.pcf__cell:has(.pcf__d:valid)::before {
opacity: 0;
}
.pcf__d {
position: relative;
width: 100%;
height: 100%;
padding: 0;
border: 0;
border-radius: 3px;
background: transparent;
color: #1f2a14;
font: 700 32px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
text-align: center;
caret-color: transparent;
outline: none;
}
.pcf__cell:has(.pcf__d:focus) {
background: rgb(31 42 20 / 0.1);
box-shadow: inset 0 -3px 0 #1f2a14;
}
.pcf__cell:has(.pcf__d:focus:placeholder-shown)::after {
content: "";
position: absolute;
left: 50%;
top: 12px;
width: 14px;
height: 26px;
margin-left: -7px;
background: #1f2a14;
animation: pcf-blink 1s steps(1) infinite;
}
.pcf__d:not(:placeholder-shown):invalid {
color: #7a1d16;
animation: pcf-shake 0.3s;
}
.pcf__status {
display: flex;
align-items: center;
gap: 8px;
margin: 12px 2px 0;
font-size: 11px;
letter-spacing: 0.06em;
}
.pcf__status::before {
content: "";
width: 7px;
height: 7px;
border-radius: 50%;
background: #5a3a1a;
}
.pcf__status::after {
content: counter(pcf-n) " of 6 digits";
}
.pcf:not(:has(.pcf__d:invalid)) .pcf__status::before {
background: #a8e08a;
box-shadow: 0 0 8px #a8e08a;
}
.pcf:not(:has(.pcf__d:invalid)) .pcf__status::after {
content: "Code complete · press Enter";
color: #e8e2d6;
}
@keyframes pcf-blink {
50% {
opacity: 0;
}
}
@keyframes pcf-shake {
25% {
transform: translateX(-3px);
}
75% {
transform: translateX(3px);
}
}
@media (prefers-reduced-motion: reduce) {
.pcf__cell:has(.pcf__d:focus:placeholder-shown)::after, .pcf__d:not(:placeholder-shown):invalid {
animation: 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 six-digit verification code typed into an olive LCD on a black pager. Ghost 8s fill empty cells, a CSS counter tallies digits and the status flips when 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.