Layer · Forms
BetaCheckbox.
bau-checkbox
Custom-rendered square with a stroke-dashed tick that draws on
commit. Native semantics: role=checkbox, Space/Enter
toggle, setFormValue, optional
indeterminate dash.
States
unchecked · checked · indeterminate · disabled
Inside a form
required · participates in FormData
// FormData appears here after submit
API
| Attribute | Type | Default | Description |
|---|---|---|---|
checked |
boolean (reflected) | false | Toggle state. Reflects to attribute on change. |
indeterminate |
boolean (reflected) | false | Renders a horizontal dash; ARIA aria-checked=mixed. |
required |
boolean (reflected) | false | Sets valueMissing when not checked. |
name · value |
string · string | '' · 'on' | Form participation. Submits value only when checked. |
label |
string | '' | Convenience label. Use the default slot for richer content. |
Parts & tokens
| Property / Part | Effect |
|---|---|
::part(box) | The square surface. |
::part(tick) | Inner SVG (tick path + dash path). |
::part(label) | Label span — style access from outside. |
--bau-checkbox-size | Overrides box dimensions. |
--bau-checkbox-bg · --bau-checkbox-bg-checked | Surface fill in each state. |
--bau-checkbox-tick | Tick stroke color. |