This page features interactive demos and side-by-side code samples that need at least 340 pixels of horizontal space. Please widen your browser window, or rotate your device, to continue.
Component <neo-checkbox> is a three-state checkbox: checked, unchecked, or indeterminate (aria-checked="mixed") for parent rows whose children are partially selected. Participates in a wrapping <label> like a native checkbox.
Default
States
Small size
Disabled
With label
Settings group
DeactivateRenameDuplicateDelete
The preview routes through the in-browser server simulator. Its current Settings (network latency, a non-200 response, or an unreachable server) are in effect, so the live preview can look like it is misbehaving. Adjust them in the Settings panel.
New state Toggle autoplay
HTMLCSS
The selected state's markup and its scoped CSS. The CSS is wrapped in <style>@scope { ... }</style> and applies to the preview only. Edits change the preview above, applied live while Sync is on, or when you click Patch or Replace. Patch morphs the preview; Replace swaps it outright.
Signals
Datastar signals declared in the selected state's markup. Change a value to drive the preview, applied live while Sync is on, or when you click Patch.
Three states: unchecked, checked, indeterminate. Click the box or focus with Tab and toggle with Space. Input on a mixed checkbox resolves it to checked, matching the native rule.
Wrapping a checkbox in a <label> makes the whole row clickable: the host forwards clicks on its closest <label> ancestor and moves focus to itself, keeping the keyboard target in sync.
A typical settings panel: each row is its own <label>, with the checkbox on the left and the description on the right. The disabled row still shows its current value but resists interaction.
Parent nodes go indeterminate when only some descendants are selected, checked when all are, and unchecked when none are. Each change posts to the server, which recomputes the parents and morphs the tree back into place.