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
idstring—Input id; ties help text via aria-describedby
namestring—Form field name
valuestring—Submitted value when checked
checkedbooleanfalseInitial checked state
indeterminatebooleanfalseMixed (dash) state; set via tiny script
disabledbooleanfalseDisable the control
requiredbooleanfalseMark as required
labelstring—Visible label beside the box
helpstring—Description shown under the label
classstring—Extra 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
idstring—Input id
namestring—Shared name that groups the radios
valuestring—Submitted value when selected
checkedbooleanfalseInitial selected state
disabledbooleanfalseDisable the control
requiredbooleanfalseMark as required
labelstring—Visible label beside the dot
classstring—Extra 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
idstring—Input id
namestring—Form field name
checkedbooleanfalseInitial on state
disabledbooleanfalseDisable the control
labelstring—Visible label beside the switch
classstring—Extra CSS classes