Radio
Lets people pick exactly one option from a short list, such as a Blade AI billing cycle. Options always live in a RadioGroup, which owns the value, label, help and error text. Three sizes, a round control and roving keyboard focus.
Preview
#previewSwitch size, orientation and state. Show code opens the React and CSS below.
import { Radio, RadioGroup } from "@blade-ai/weft/components/radio";
export function BillingCycle({ value, onChange }: Props) {
return (
<RadioGroup
label="Billing cycle"
name="cycle"
value={value}
onChange={({ value }) => onChange(value)}
>
<Radio value="monthly">Monthly</Radio>
<Radio value="yearly" helpText="Two months free.">Yearly</Radio>
<Radio value="custom">Custom</Radio>
</RadioGroup>
);
}All states
#all-statesEvery state from the Radio spec, named. Medium unless noted.
Props
#propsBooleans are is-prefixed. RadioGroup owns name, value and validation. Anything marked UNDEFINED is an open decision.
Usage
#usageShort rules for choosing and writing radios.
Accessibility
#accessibilityNative input type radio with a shared name. Arrows move and select; Enter never selects.
Agent Spec
#agent-specMachine-readable spec, tables (a)–(h). Same source as /specs/radio.json. Anything marked UNDEFINED needs a decision before it is built.
[ "Pressed fill for a selected circle (--undefined-interactive-background-primary-pressed; falls back to the highlighted fill)", "Read-only visual treatment (gray fill proposed, not approved)", "When the error first shows: on submit (fallback) or on change", "necessityIndicator visual (fallback: none; say it in the legend)", "Name of the aria-label prop for label-less options", "Name of the autoFocus prop", "Dot motion (fallback: instant)" ]