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
---
title: Checkbox
summary: Native checkbox, tinted with the accent color. No hand-drawn box.
---
## Basic
`input[type="checkbox"]` is the component — styled bare with `accent-color`
rather than a custom box, so the browser draws its own check. This is a real
reduction, not just a rename: it deletes the hand-drawn SVG-checkmark markup
that a `.gl-choice__box` span used to need. The wrapping `<label>` is told
apart from Field's label structurally — it `:has()` a checkbox as a direct
child — so it needs no class either.
<figure class="example">
<figcaption>Checkbox</figcaption>
<div>
<label>
<input type="checkbox" />
Notify me
</label>
<label>
<input type="checkbox" checked="" />
Ship on merge
</label>
</div>
<details open><summary>Markup</summary>
<pre><code><label>
<input type="checkbox" />
Notify me
</label>
<label>
<input type="checkbox" checked="" />
Ship on merge
</label></code></pre>
</details>
</figure>
## Disabled
<figure class="example">
<figcaption>Disabled</figcaption>
<div>
<label>
<input type="checkbox" disabled="" />
Not available on this plan
</label>
</div>
<details><summary>Markup</summary>
<pre><code><label>
<input type="checkbox" disabled="" />
Not available on this plan
</label></code></pre>
</details>
</figure>
## In a fieldset
`<fieldset>`/`<legend>` are styled bare too — they already mean this.
<figure class="example">
<figcaption>Fieldset</figcaption>
<div>
<fieldset>
<legend>Notify me about</legend>
<label>
<input type="checkbox" checked="" />
Overdue tasks
</label>
<label>
<input type="checkbox" />
Weekly digest
</label>
</fieldset>
</div>
<details><summary>Markup</summary>
<pre><code><fieldset>
<legend>Notify me about</legend>
<label>
<input type="checkbox" checked="" />
Overdue tasks
</label>
<label>
<input type="checkbox" />
Weekly digest
</label>
</fieldset></code></pre>
</details>
</figure>
## API
<table>
<thead><tr><th scope="col">Element / attribute</th><th scope="col">Values</th><th scope="col">Notes</th></tr></thead>
<tbody>
<tr><td><code>input[type="checkbox"]</code></td><td></td><td>Required base — no class. Tinted with <code>accent-color</code>.</td></tr>
<tr><td><code>checked</code></td><td>boolean</td><td></td></tr>
<tr><td><code>disabled</code></td><td>boolean</td><td></td></tr>
<tr><td><code>label</code></td><td>text content</td><td>Wrap the input directly — <code>label:has(> input[type="checkbox"])</code> is what applies the row layout.</td></tr>
</tbody>
</table>