Animated Form by codepeek
Zoom
Saved
1 line⌘Z Undo
1<!--2 Author: @codepeek3 License: MIT4 Tags: #animated #checkbox #form #light #minimal5-->6<form class="mcf" action="#" method="post">7 <div class="mcf__head">8 <span class="mcf__avatar" aria-hidden="true">JR</span>9 <p class="mcf__context">10 Replying to11 <b>Ines</b>12 in13 <span class="mcf__mark">Spacing scale v3</span>14 </p>15 </div>16 <label class="mcf__label" for="mcf-body">Your reply</label>17 <textarea class="mcf__body" id="mcf-body" name="body" rows="3" placeholder="Agree on a 4px base, but the 28 step feels loose…" required>18 </textarea>19 <div class="mcf__foot">20 <label class="mcf__notify">21 <input class="mcf__check" type="checkbox" name="notify" checked/>22 <span class="mcf__tick" aria-hidden="true">23 </span>24 Notify #design25 </label>26 <button class="mcf__send" type="submit">27 Reply28 <kbd class="mcf__kbd">⌘↵</kbd>29 </button>30 </div>31</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
28
29
30
31
<!--
Author: @codepeek
License: MIT
Tags: #animated #checkbox #form #light #minimal
-->
<form class="mcf" action="#" method="post">
<div class="mcf__head">
<span class="mcf__avatar" aria-hidden="true">JR</span>
<p class="mcf__context">
Replying to
<b>Ines</b>
in
<span class="mcf__mark">Spacing scale v3</span>
</p>
</div>
<label class="mcf__label" for="mcf-body">Your reply</label>
<textarea class="mcf__body" id="mcf-body" name="body" rows="3" placeholder="Agree on a 4px base, but the 28 step feels loose…" required>
</textarea>
<div class="mcf__foot">
<label class="mcf__notify">
<input class="mcf__check" type="checkbox" name="notify" checked/>
<span class="mcf__tick" aria-hidden="true">
</span>
Notify #design
</label>
<button class="mcf__send" type="submit">
Reply
<kbd class="mcf__kbd">⌘↵</kbd>
</button>
</div>
</form>1/* * Author: @codepeek * License: MIT * Tags: #animated #checkbox #form #light #minimal */2.mcf {3 width: 380px;4 padding: 18px;5 box-sizing: border-box;6 border: 1px solid #e6e1d8;7 border-radius: 14px;8 background: #fcfbf8;9 color: #2b2925;10 font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;11 box-shadow: 0 1px 2px rgba(40, 30, 10, 0.06), 0 14px 28px -14px rgba(40, 30, 10, 0.28);12}13.mcf__head {14 display: flex;15 align-items: center;16 gap: 10px;17 margin-bottom: 14px;18}19.mcf__avatar {20 display: grid;21 place-items: center;22 width: 32px;23 height: 32px;24 flex: none;25 border-radius: 50%;26 background: #2b2925;27 color: #f5e663;28 font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;29}30.mcf__context {31 margin: 0;32 color: #6f6a60;33 font-size: 13px;34}35.mcf__context b {36 color: #2b2925;37 font-weight: 600;38}39.mcf__mark {40 color: #2b2925;41 background: linear-gradient(transparent 52%, #f5e663 52%, #f5e663 92%, transparent 92%) 0 0 / 0% 100% no-repeat;42 transition: background-size 520ms cubic-bezier(0.2, 0.8, 0.2, 1);43}44.mcf:focus-within .mcf__mark {45 background-size: 100% 100%;46}47.mcf__label {48 display: block;49 margin-bottom: 6px;50 color: #9a9488;51 font-size: 11px;52 font-weight: 600;53 letter-spacing: 0.08em;54 text-transform: uppercase;55}56.mcf__body {57 display: block;58 width: 100%;59 height: 64px;60 padding: 10px 12px;61 box-sizing: border-box;62 resize: none;63 border: 1.5px solid #e1dbcf;64 border-radius: 10px;65 background: #f6f3ec;66 color: #2b2925;67 font: inherit;68 outline: none;69 transition: height 320ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;70}71.mcf__body::placeholder {72 color: #aaa395;73}74.mcf__body:focus {75 height: 96px;76 border-color: #2b2925;77 background: #fff;78 box-shadow: 0 0 0 4px rgba(245, 230, 99, 0.6);79}80.mcf__foot {81 display: flex;82 align-items: center;83 justify-content: space-between;84 margin-top: 12px;85}86.mcf__notify {87 position: relative;88 display: inline-flex;89 align-items: center;90 gap: 8px;91 color: #55504a;92 font-size: 13px;93 cursor: pointer;94}95.mcf__check {96 position: absolute;97 width: 1px;98 height: 1px;99 margin: -1px;100 padding: 0;101 border: 0;102 overflow: hidden;103 clip: rect(0 0 0 0);104 white-space: nowrap;105}106.mcf__tick {107 position: relative;108 width: 16px;109 height: 16px;110 box-sizing: border-box;111 border: 1.5px solid #2b2925;112 border-radius: 4px;113 transition: background 150ms ease;114}115.mcf__tick::after {116 content: "";117 position: absolute;118 top: 1px;119 left: 4px;120 width: 4px;121 height: 8px;122 border: solid #f5e663;123 border-width: 0 2px 2px 0;124 transform: rotate(45deg) scale(0);125 transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);126}127.mcf__check:checked + .mcf__tick {128 background: #2b2925;129}130.mcf__check:checked + .mcf__tick::after {131 transform: rotate(45deg) scale(1);132}133.mcf__check:focus-visible + .mcf__tick {134 outline: 2px solid #2b2925;135 outline-offset: 2px;136}137.mcf__send {138 display: inline-flex;139 align-items: center;140 gap: 8px;141 height: 36px;142 padding: 0 10px 0 16px;143 border: 0;144 border-radius: 999px;145 background: #2b2925;146 color: #fff;147 font: inherit;148 font-size: 13px;149 font-weight: 600;150 cursor: pointer;151 transition: opacity 200ms ease, transform 140ms cubic-bezier(0.34, 1.56, 0.64, 1);152}153.mcf:has(.mcf__body:placeholder-shown) .mcf__send {154 opacity: 0.4;155}156.mcf__send:hover {157 transform: translateY(-1px);158}159.mcf__send:active {160 transform: translateY(1px) scale(0.97);161}162.mcf__send:focus-visible {163 outline: 2px solid #2b2925;164 outline-offset: 3px;165}166.mcf__kbd {167 padding: 3px 5px;168 border-radius: 4px;169 background: rgba(255, 255, 255, 0.15);170 font: 500 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;171}
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/* * Author: @codepeek * License: MIT * Tags: #animated #checkbox #form #light #minimal */
.mcf {
width: 380px;
padding: 18px;
box-sizing: border-box;
border: 1px solid #e6e1d8;
border-radius: 14px;
background: #fcfbf8;
color: #2b2925;
font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
box-shadow: 0 1px 2px rgba(40, 30, 10, 0.06), 0 14px 28px -14px rgba(40, 30, 10, 0.28);
}
.mcf__head {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 14px;
}
.mcf__avatar {
display: grid;
place-items: center;
width: 32px;
height: 32px;
flex: none;
border-radius: 50%;
background: #2b2925;
color: #f5e663;
font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.mcf__context {
margin: 0;
color: #6f6a60;
font-size: 13px;
}
.mcf__context b {
color: #2b2925;
font-weight: 600;
}
.mcf__mark {
color: #2b2925;
background: linear-gradient(transparent 52%, #f5e663 52%, #f5e663 92%, transparent 92%) 0 0 / 0% 100% no-repeat;
transition: background-size 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mcf:focus-within .mcf__mark {
background-size: 100% 100%;
}
.mcf__label {
display: block;
margin-bottom: 6px;
color: #9a9488;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.mcf__body {
display: block;
width: 100%;
height: 64px;
padding: 10px 12px;
box-sizing: border-box;
resize: none;
border: 1.5px solid #e1dbcf;
border-radius: 10px;
background: #f6f3ec;
color: #2b2925;
font: inherit;
outline: none;
transition: height 320ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}
.mcf__body::placeholder {
color: #aaa395;
}
.mcf__body:focus {
height: 96px;
border-color: #2b2925;
background: #fff;
box-shadow: 0 0 0 4px rgba(245, 230, 99, 0.6);
}
.mcf__foot {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 12px;
}
.mcf__notify {
position: relative;
display: inline-flex;
align-items: center;
gap: 8px;
color: #55504a;
font-size: 13px;
cursor: pointer;
}
.mcf__check {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
border: 0;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
}
.mcf__tick {
position: relative;
width: 16px;
height: 16px;
box-sizing: border-box;
border: 1.5px solid #2b2925;
border-radius: 4px;
transition: background 150ms ease;
}
.mcf__tick::after {
content: "";
position: absolute;
top: 1px;
left: 4px;
width: 4px;
height: 8px;
border: solid #f5e663;
border-width: 0 2px 2px 0;
transform: rotate(45deg) scale(0);
transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mcf__check:checked + .mcf__tick {
background: #2b2925;
}
.mcf__check:checked + .mcf__tick::after {
transform: rotate(45deg) scale(1);
}
.mcf__check:focus-visible + .mcf__tick {
outline: 2px solid #2b2925;
outline-offset: 2px;
}
.mcf__send {
display: inline-flex;
align-items: center;
gap: 8px;
height: 36px;
padding: 0 10px 0 16px;
border: 0;
border-radius: 999px;
background: #2b2925;
color: #fff;
font: inherit;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: opacity 200ms ease, transform 140ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mcf:has(.mcf__body:placeholder-shown) .mcf__send {
opacity: 0.4;
}
.mcf__send:hover {
transform: translateY(-1px);
}
.mcf__send:active {
transform: translateY(1px) scale(0.97);
}
.mcf__send:focus-visible {
outline: 2px solid #2b2925;
outline-offset: 3px;
}
.mcf__kbd {
padding: 3px 5px;
border-radius: 4px;
background: rgba(255, 255, 255, 0.15);
font: 500 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}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.
◉ 1 views
Build it with AIA ready prompt with the code, the credit and how to adapt it to your project.
A compact reply box for a design thread. Focusing it sweeps a highlighter across the quoted title and grows the textarea; Reply stays muted until you type.
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.