Checkbox
Render an Astryx checkbox input.
Astryx Props
JSON-safe CheckboxInput props forwarded to Astryx.
Supported Astryx props include:
ref(React.Ref<HTMLInputElement>): Ref forwarded to the underlying <input> element.label(string; required): Label text for the checkbox (always rendered for accessibility).isLabelHidden(boolean): Whether to visually hide the label (still accessible to screen readers).description(string): Description text displayed below the label.value(boolean or 'indeterminate'; required): Whether the checkbox is checked, unchecked, or indeterminate.onChange((checked: boolean, e: ChangeEvent<HTMLInputElement>) => void): Callback fired when the checkbox state changes.changeAction((checked: boolean, e: ChangeEvent<HTMLInputElement>) => void or Promise<void>): Async action on change. Fires after onChange if not prevented. Shows loading spinner while pending.isLoading(boolean): Whether the checkbox is in a loading state. Shows spinner and prevents interaction.isDisabled(boolean): Whether the checkbox is disabled.isReadOnly(boolean): Whether the checkbox is read-only. Displays the current state at full opacity but prevents interaction. Unlike 'isDisabled', read-only checkboxes are not visually dimmed.isOptional(boolean): Whether the field is optional. Mutually exclusive with isRequired.isRequired(boolean): Whether the checkbox is required. Mutually exclusive with isOptional.size('sm' or 'md'): The size of the checkbox. sm for compact layouts, md for default.onFocus((e: FocusEvent<HTMLInputElement>) => void): Callback fired when the checkbox receives focus.onBlur((e: FocusEvent<HTMLInputElement>) => void): Callback fired when the checkbox loses focus.labelIcon(IconType): Icon to display before the label text. See 'npx astryx docs icons' for valid semantic names.status({ type: 'error' or 'warning' or 'success', message: string }): Status indicator. Displays a colored message box below the checkbox and sets aria-invalid for errors.
Props typed as React nodes, render functions, event handlers, refs, or StyleX styles are documented for Astryx parity but cannot be serialized directly from Python unless the wrapper adapts them.
See Astryx component docs: https://astryx.atmeta.com/components/CheckboxInput.
Functions
constructor__init__(value=False, *, label='', disabled=False, size=None, label_hidden=None, description=None, loading=None, read_only=None, status=None, **props) -> Noneparamvaluebool= FalseSynchronized component value.
paramlabelstr= ''Visible or accessible label for the component.
paramdisabledbool= FalseWhether the component should render disabled.
paramsizestr | None= NoneCheckbox size.
paramlabel_hiddenbool | None= NoneWhether to visually hide the accessible label.
paramdescriptionstr | None= NoneHelper text displayed below the label.
paramloadingbool | None= NoneWhether to show the loading state.
paramread_onlybool | None= NoneWhether interaction is disabled without dimming the value.
paramstatusMapping[str, Any] | None= NoneValidation status record.
parampropsAny= {}Returns
None