eXtreme Automation
Back to catalog
Components

Form Controls

Checkbox, Radio, and Switch — native inputs styled with custom rose marks. Each is keyboard-accessible, label-associated, and self-contained.

Checkbox

Usage

import { Checkbox } from '@xa/ui';

<Checkbox label="Email me about new courses"
          help="At most one update per month." />
<Checkbox label="Checked" checked />
<Checkbox label="Mixed" indeterminate />

Props

PropTypeDefaultDescription
idstringInput id; ties help text via aria-describedby
namestringForm field name
valuestringSubmitted value when checked
checkedbooleanfalseInitial checked state
indeterminatebooleanfalseMixed (dash) state; set via tiny script
disabledbooleanfalseDisable the control
requiredbooleanfalseMark as required
labelstringVisible label beside the box
helpstringDescription shown under the label
classstringExtra CSS classes

Radio

Group of 3 — shared name="plan"

Usage

import { Radio } from '@xa/ui';

<Radio name="plan" value="solo" label="Solo" checked />
<Radio name="plan" value="team" label="Team" />
<Radio name="plan" value="org"  label="Organisation" />

Props

PropTypeDefaultDescription
idstringInput id
namestringShared name that groups the radios
valuestringSubmitted value when selected
checkedbooleanfalseInitial selected state
disabledbooleanfalseDisable the control
requiredbooleanfalseMark as required
labelstringVisible label beside the dot
classstringExtra CSS classes

Switch

Usage

import { Switch } from '@xa/ui';

<Switch label="Email notifications" checked />
<Switch label="Beta features" />

Built on a native checkbox with role="switch" — toggle with Space, focus with Tab.

Props

PropTypeDefaultDescription
idstringInput id
namestringForm field name
checkedbooleanfalseInitial on state
disabledbooleanfalseDisable the control
labelstringVisible label beside the switch
classstringExtra CSS classes