Skip to content

Radio Group

Forms

A group of mutually exclusive options.

atlas-radio-group

Examples

Vertical and horizontal

Options are data; bind [(value)] . Use orientation="horizontal" for short lists.

Selected: default

Required, in a form field

In atlas-form-field the field label names the radio group. Bound with [formField] , it reports required and shows the error once the form is submitted.

Disabled options

A disabled option stays visible with its reason, and the arrow keys skip it.

Billing: monthly

API

Generated from the library source, so it always matches the code.

AtlasRadioGroupComponent atlas-radio-group

InputTypeDefaultDescription
options requiredRadioOption[]— The choices; disabled options cannot be chosen.
value two-waystring'' The chosen option value ; '' when none is chosen (two-way, or Signal Forms [field] ).
disabled booleanfalse Disables the control. Set automatically when the control is bound with Signal Forms [field] .
errors readonly ValidationError.WithOptionalFieldTree[][] Validation errors of the bound field. Set by Signal Forms [field] .
required booleanfalse Whether a value is required. Set by Signal Forms [field] .
invalid booleanfalse Whether the field is invalid. Set by Signal Forms [field] .
touched booleanfalse Whether the user has interacted with the field. Set by Signal Forms [field] .
readonly booleanfalse Whether the field is read-only. Set by Signal Forms [field] .
pending booleanfalse Whether async validation is running. Set by Signal Forms [field] .
name string'' Name of the field. Set by Signal Forms [field] .
orientation 'horizontal' | 'vertical''vertical' Stacks the options ( vertical ) or lays them out in a row ( horizontal ).
ariaLabel string | nullnull Accessible name when no visible label names the control (use one or the other, WCAG 2.5.3).
inputId string | undefinedundefinedid of the focusable element, so a visible <label atlasLabel for="…"> names it. Inside atlas-form-field the field supplies one.
ariaDescribedBy string | nullnull Extra ids for aria-describedby , merged with the surrounding form field's hint or error.
class string'' Extra CSS classes, merged with the component's own through cn() ; yours win on conflicts.
OutputPayloadDescription
touchvoid Emits when the control loses focus, so Signal Forms marks the field touched.

Types

RadioOption

PropertyTypeDescription
value string —
label string —
disabled? boolean —