Checkbox

A checkbox with label, description and error. Submits value when checked.

Source on GitHub

Send me updates (label as content)
Code

API

For AI agents: this API as Markdown, or every component in llms-full.txt.

<ray-checkbox> · RayCheckbox

PropertyAttributeTypeDefaultDescription
checkedchecked (initial)booleanCurrent state. The checked attribute is the initial state (restored on reset).
indeterminateindeterminate reflectsbooleanMixed state; cleared on the next user change.
valuevalue reflectsstringonSubmitted value when checked.
namenamestringForm field name.
labellabelstringLabel text (or put the label in the content).
descriptiondescriptionstringHelp text.
errorerrorstringError text.
requiredrequiredbooleanMust be checked to submit.
disableddisabledbooleanNot interactive nor submitted.
variantvariant reflectsfilled | outlinefilledChecked look: filled box, or colored border and mark.
colorcolorstringA palette color or any CSS color for the checked state.
sizesize reflectsxs | sm | md | lg | xlsmBox and font size.
labelPositionlabel-position reflectsend | start | right | leftendSide of the label: start/end follow the writing direction; left/right are sides of the screen.
EventDescription
changeWhen the user toggles it.
SlotDescription
(default)Label content.
PartDescription
inputThe native checkbox (transparent, on top of the indicator).
indicatorThe drawn box.
labelThe label.