Baustein UI

Layer · Forms

Beta

Checkbox.

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

five visual states

unchecked · checked · indeterminate · disabled

Inside a form

FormData participation

required · participates in FormData

Submit
// FormData appears here after submit

API

attributes & properties
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

style hooks
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-sizeOverrides box dimensions.
--bau-checkbox-bg · --bau-checkbox-bg-checkedSurface fill in each state.
--bau-checkbox-tickTick stroke color.