Dark Checkbox by codepeek
Zoom
Saved
1 line⌘Z Undo
1<!--2 Author: @codepeek3 License: MIT4 Tags: #checkbox #dark #minimal #mono #terminal5-->6<div class="ftc">7 <div class="ftc__root">8 <span class="ftc__all" aria-hidden="true">9 </span>10 <span class="ftc__dir">src/</span>11 <span class="ftc__meta">3 changed</span>12 </div>13 <ul class="ftc__list">14 <li>15 <label class="ftc__file">16 <input class="ftc__in" type="checkbox" checked>17 <span class="ftc__box" aria-hidden="true">18 </span>19 <span class="ftc__st ftc__st--m">M</span>20 router.ts21 </label>22 </li>23 <li>24 <label class="ftc__file">25 <input class="ftc__in" type="checkbox">26 <span class="ftc__box" aria-hidden="true">27 </span>28 <span class="ftc__st ftc__st--a">A</span>29 styles.css30 </label>31 </li>32 <li>33 <label class="ftc__file">34 <input class="ftc__in" type="checkbox">35 <span class="ftc__box" aria-hidden="true">36 </span>37 <span class="ftc__st ftc__st--d">D</span>38 legacy.js39 </label>40 </li>41 </ul>42</div>
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
<!--
Author: @codepeek
License: MIT
Tags: #checkbox #dark #minimal #mono #terminal
-->
<div class="ftc">
<div class="ftc__root">
<span class="ftc__all" aria-hidden="true">
</span>
<span class="ftc__dir">src/</span>
<span class="ftc__meta">3 changed</span>
</div>
<ul class="ftc__list">
<li>
<label class="ftc__file">
<input class="ftc__in" type="checkbox" checked>
<span class="ftc__box" aria-hidden="true">
</span>
<span class="ftc__st ftc__st--m">M</span>
router.ts
</label>
</li>
<li>
<label class="ftc__file">
<input class="ftc__in" type="checkbox">
<span class="ftc__box" aria-hidden="true">
</span>
<span class="ftc__st ftc__st--a">A</span>
styles.css
</label>
</li>
<li>
<label class="ftc__file">
<input class="ftc__in" type="checkbox">
<span class="ftc__box" aria-hidden="true">
</span>
<span class="ftc__st ftc__st--d">D</span>
legacy.js
</label>
</li>
</ul>
</div>1/* * Author: @codepeek * License: MIT * Tags: #checkbox #dark #minimal #mono #terminal */2.ftc {3 width: 280px;4 box-sizing: border-box;5 padding: 16px 16px 12px;6 border-radius: 8px;7 background: #17191a;8 border: 1px solid #2a2e30;9 color: #cfd3cc;10 font: 13px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;11}12.ftc__root {13 display: flex;14 align-items: center;15 gap: 9px;16 padding: 4px 8px;17}18.ftc__dir {19 font-weight: 700;20 color: #eef0ea;21}22.ftc__meta {23 margin-left: auto;24 font-size: 11px;25 color: #6c7069;26}27.ftc__all,.ftc__box {28 position: relative;29 flex: none;30 width: 14px;31 height: 14px;32 box-sizing: border-box;33 border: 1.5px solid #6c7069;34 border-radius: 3px;35 transition: background .2s,border-color .2s;36}37.ftc__all::after,.ftc__box::after {38 content: "";39 position: absolute;40 opacity: 0;41 transition: opacity .15s;42}43.ftc:has(.ftc__in:checked) .ftc__all {44 background: #e0a84a;45 border-color: #e0a84a;46}47.ftc:has(.ftc__in:checked) .ftc__all::after {48 left: 2px;49 top: 4.5px;50 width: 7px;51 height: 2px;52 background: #17191a;53 opacity: 1;54}55.ftc:not(:has(.ftc__in:not(:checked))) .ftc__all {56 background: #9cc58a;57 border-color: #9cc58a;58}59.ftc:not(:has(.ftc__in:not(:checked))) .ftc__all::after,.ftc__in:checked + .ftc__box::after {60 left: 3.5px;61 top: .5px;62 width: 3px;63 height: 7px;64 background: none;65 border: solid #17191a;66 border-width: 0 2px 2px 0;67 transform: rotate(45deg);68 opacity: 1;69}70.ftc__list {71 margin: 2px 0 0 14px;72 padding: 0 0 0 14px;73 border-left: 1px solid #33373a;74 list-style: none;75}76.ftc__list li {77 position: relative;78}79.ftc__list li::before {80 content: "";81 position: absolute;82 left: -14px;83 top: 50%;84 width: 10px;85 border-top: 1px solid #33373a;86}87.ftc__file {88 position: relative;89 display: flex;90 align-items: center;91 gap: 9px;92 padding: 5px 8px;93 border-radius: 4px;94 cursor: pointer;95 transition: background .15s,color .15s;96}97.ftc__file:hover {98 background: #212425;99}100.ftc__in {101 position: absolute;102 top: 0;103 left: 0;104 width: 1px;105 height: 1px;106 margin: 0;107 opacity: 0;108}109.ftc__in:checked + .ftc__box {110 background: #9cc58a;111 border-color: #9cc58a;112}113.ftc__file:has(.ftc__in:checked) {114 color: #eef0ea;115}116.ftc__in:focus-visible + .ftc__box {117 outline: 2px solid #9cc58a;118 outline-offset: 2px;119}120.ftc__st {121 width: 10px;122 font-size: 11px;123 font-weight: 700;124}125.ftc__st--m {126 color: #e0a84a;127}128.ftc__st--a {129 color: #9cc58a;130}131.ftc__st--d {132 color: #e5664f;133}
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
/* * Author: @codepeek * License: MIT * Tags: #checkbox #dark #minimal #mono #terminal */
.ftc {
width: 280px;
box-sizing: border-box;
padding: 16px 16px 12px;
border-radius: 8px;
background: #17191a;
border: 1px solid #2a2e30;
color: #cfd3cc;
font: 13px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;
}
.ftc__root {
display: flex;
align-items: center;
gap: 9px;
padding: 4px 8px;
}
.ftc__dir {
font-weight: 700;
color: #eef0ea;
}
.ftc__meta {
margin-left: auto;
font-size: 11px;
color: #6c7069;
}
.ftc__all,.ftc__box {
position: relative;
flex: none;
width: 14px;
height: 14px;
box-sizing: border-box;
border: 1.5px solid #6c7069;
border-radius: 3px;
transition: background .2s,border-color .2s;
}
.ftc__all::after,.ftc__box::after {
content: "";
position: absolute;
opacity: 0;
transition: opacity .15s;
}
.ftc:has(.ftc__in:checked) .ftc__all {
background: #e0a84a;
border-color: #e0a84a;
}
.ftc:has(.ftc__in:checked) .ftc__all::after {
left: 2px;
top: 4.5px;
width: 7px;
height: 2px;
background: #17191a;
opacity: 1;
}
.ftc:not(:has(.ftc__in:not(:checked))) .ftc__all {
background: #9cc58a;
border-color: #9cc58a;
}
.ftc:not(:has(.ftc__in:not(:checked))) .ftc__all::after,.ftc__in:checked + .ftc__box::after {
left: 3.5px;
top: .5px;
width: 3px;
height: 7px;
background: none;
border: solid #17191a;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
opacity: 1;
}
.ftc__list {
margin: 2px 0 0 14px;
padding: 0 0 0 14px;
border-left: 1px solid #33373a;
list-style: none;
}
.ftc__list li {
position: relative;
}
.ftc__list li::before {
content: "";
position: absolute;
left: -14px;
top: 50%;
width: 10px;
border-top: 1px solid #33373a;
}
.ftc__file {
position: relative;
display: flex;
align-items: center;
gap: 9px;
padding: 5px 8px;
border-radius: 4px;
cursor: pointer;
transition: background .15s,color .15s;
}
.ftc__file:hover {
background: #212425;
}
.ftc__in {
position: absolute;
top: 0;
left: 0;
width: 1px;
height: 1px;
margin: 0;
opacity: 0;
}
.ftc__in:checked + .ftc__box {
background: #9cc58a;
border-color: #9cc58a;
}
.ftc__file:has(.ftc__in:checked) {
color: #eef0ea;
}
.ftc__in:focus-visible + .ftc__box {
outline: 2px solid #9cc58a;
outline-offset: 2px;
}
.ftc__st {
width: 10px;
font-size: 11px;
font-weight: 700;
}
.ftc__st--m {
color: #e0a84a;
}
.ftc__st--a {
color: #9cc58a;
}
.ftc__st--d {
color: #e5664f;
}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 monospace file tree for staging changes; the folder box shows empty, partial dash or full tick purely from its children's states with :has().
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.