pub fn SpCheckbox(_: SpCheckboxProps) -> ElementExpand description
A togglable checkbox for a bool-typed value.
Maps to <sp-checkbox>. children is the checkbox’s own label, rendered as its
light-DOM content (<sp-checkbox>label</sp-checkbox>) — SWC gives sp-checkbox no
separate label slot, so a sibling field label would render disconnected from the
control. Setting invalid to true renders the SWC error state. Setting disabled
to true renders the SWC disabled state. onclick fires on every toggle press,
mirroring SpSwitch’s checked/onclick pattern — the caller owns the boolean
state and re-renders checked from it rather than reading the new state off a
native change event.
§Props
For details, see the props struct definition.