Anatomy
aegov-radio renders a native <input type="radio">, optionally wrapped in a <label> when label is set, with the hint and error message as sibling regions. aegov-radio-group renders a native <fieldset>/<legend> (with role="radiogroup") around a set of radios, plus its own shared hint and error regions.

| Item | Name | Description |
|---|---|---|
1 |
Control | The native radio input — circular, checked/unchecked |
2 |
Label | Clickable text describing the option (label prop) |
3 |
Hint | Supporting helper text shown below the label — stays visible while an error shows |
4 |
Error message | Shown after the hint once is-invalid is set |
5 |
Legend (group only) | The group's own accessible name, from aegov-radio-group's label |
Basics
aegov-radio-group requires a name, shared by every child radio, so form submission and mutual exclusivity work correctly. Give each aegov-radio a value, and set is-checked on the one that should be selected by default.
<aegov-radio-group name="title-basics" label="Title">
<aegov-radio field-id="title-mr" value="mr" label="Mr" is-checked="true"></aegov-radio>
<aegov-radio field-id="title-ms" value="ms" label="Ms"></aegov-radio>
<aegov-radio field-id="title-mrs" value="mrs" label="Mrs"></aegov-radio>
<aegov-radio field-id="title-dr" value="dr" label="Dr"></aegov-radio>
</aegov-radio-group>
import { AegovRadioGroup, AegovRadio } from '@aegov/designsystem-react';
export default function RadioBasics() {
return (
<AegovRadioGroup name="title-basics" label="Title">
<AegovRadio fieldId="title-mr" value="mr" label="Mr" isChecked />
<AegovRadio fieldId="title-ms" value="ms" label="Ms" />
<AegovRadio fieldId="title-mrs" value="mrs" label="Mrs" />
<AegovRadio fieldId="title-dr" value="dr" label="Dr" />
</AegovRadioGroup>
);
}
<template>
<aegov-radio-group name="title-basics" label="Title">
<aegov-radio field-id="title-mr" value="mr" label="Mr" is-checked="true"></aegov-radio>
<aegov-radio field-id="title-ms" value="ms" label="Ms"></aegov-radio>
<aegov-radio field-id="title-mrs" value="mrs" label="Mrs"></aegov-radio>
<aegov-radio field-id="title-dr" value="dr" label="Dr"></aegov-radio>
</aegov-radio-group>
</template>
import { Component } from '@angular/core';
import { AegovRadioGroup, AegovRadio } from '@aegov/designsystem-angular';
@Component({
selector: 'app-radio-basics',
imports: [AegovRadioGroup, AegovRadio],
template: `
<aegov-radio-group name="title-basics" label="Title">
<aegov-radio field-id="title-mr" value="mr" label="Mr" [isChecked]="true"></aegov-radio>
<aegov-radio field-id="title-ms" value="ms" label="Ms"></aegov-radio>
<aegov-radio field-id="title-mrs" value="mrs" label="Mrs"></aegov-radio>
<aegov-radio field-id="title-dr" value="dr" label="Dr"></aegov-radio>
</aegov-radio-group>
`,
})
export class RadioBasicsComponent {}
Label and hint
Add hint for supporting helper text underneath a radio's label — it stays visible while a validation error shows, because that is when the user needs it most.
<aegov-radio-group name="contact-method" label="Preferred contact method">
<aegov-radio field-id="contact-email" value="email" label="Email" hint="We'll send updates to your registered email address." is-checked="true"></aegov-radio>
<aegov-radio field-id="contact-sms" value="sms" label="SMS" hint="Short text alerts to your registered mobile number."></aegov-radio>
<aegov-radio field-id="contact-call" value="call" label="Phone call" hint="A representative will call you during working hours."></aegov-radio>
</aegov-radio-group>
import { AegovRadioGroup, AegovRadio } from '@aegov/designsystem-react';
export default function RadioLabelHint() {
return (
<AegovRadioGroup name="contact-method" label="Preferred contact method">
<AegovRadio
fieldId="contact-email"
value="email"
label="Email"
hint="We'll send updates to your registered email address."
isChecked
/>
<AegovRadio
fieldId="contact-sms"
value="sms"
label="SMS"
hint="Short text alerts to your registered mobile number."
/>
<AegovRadio
fieldId="contact-call"
value="call"
label="Phone call"
hint="A representative will call you during working hours."
/>
</AegovRadioGroup>
);
}
<template>
<aegov-radio-group name="contact-method" label="Preferred contact method">
<aegov-radio field-id="contact-email" value="email" label="Email" hint="We'll send updates to your registered email address." is-checked="true"></aegov-radio>
<aegov-radio field-id="contact-sms" value="sms" label="SMS" hint="Short text alerts to your registered mobile number."></aegov-radio>
<aegov-radio field-id="contact-call" value="call" label="Phone call" hint="A representative will call you during working hours."></aegov-radio>
</aegov-radio-group>
</template>
import { Component } from '@angular/core';
import { AegovRadioGroup, AegovRadio } from '@aegov/designsystem-angular';
@Component({
selector: 'app-radio-label-hint',
imports: [AegovRadioGroup, AegovRadio],
template: `
<aegov-radio-group name="contact-method" label="Preferred contact method">
<aegov-radio field-id="contact-email" value="email" label="Email" hint="We'll send updates to your registered email address." [isChecked]="true"></aegov-radio>
<aegov-radio field-id="contact-sms" value="sms" label="SMS" hint="Short text alerts to your registered mobile number."></aegov-radio>
<aegov-radio field-id="contact-call" value="call" label="Phone call" hint="A representative will call you during working hours."></aegov-radio>
</aegov-radio-group>
`,
})
export class RadioLabelHintComponent {}
States
A radio can be checked, unchecked, disabled (in either checked state), or required. is-disabled on an individual radio disables only that option — use the group's own is-disabled (see Group disabled) to lock every option at once.
<aegov-radio-group name="payment-states" label="Payment method">
<aegov-radio field-id="pay-card" value="card" label="Credit or debit card" is-checked="true"></aegov-radio>
<aegov-radio field-id="pay-bank" value="bank" label="Direct bank transfer"></aegov-radio>
<aegov-radio field-id="pay-cash" value="cash" label="Cash at service centre" is-disabled="true" hint="Currently unavailable due to system maintenance."></aegov-radio>
<aegov-radio field-id="pay-crypto" value="crypto" label="Cryptocurrency" is-required="true"></aegov-radio>
</aegov-radio-group>
import { AegovRadioGroup, AegovRadio } from '@aegov/designsystem-react';
export default function RadioStates() {
return (
<AegovRadioGroup name="payment-states" label="Payment method">
<AegovRadio fieldId="pay-card" value="card" label="Credit or debit card" isChecked />
<AegovRadio fieldId="pay-bank" value="bank" label="Direct bank transfer" />
<AegovRadio
fieldId="pay-cash"
value="cash"
label="Cash at service centre"
isDisabled
hint="Currently unavailable due to system maintenance."
/>
<AegovRadio fieldId="pay-crypto" value="crypto" label="Cryptocurrency" isRequired />
</AegovRadioGroup>
);
}
<template>
<aegov-radio-group name="payment-states" label="Payment method">
<aegov-radio field-id="pay-card" value="card" label="Credit or debit card" is-checked="true"></aegov-radio>
<aegov-radio field-id="pay-bank" value="bank" label="Direct bank transfer"></aegov-radio>
<aegov-radio field-id="pay-cash" value="cash" label="Cash at service centre" is-disabled="true" hint="Currently unavailable due to system maintenance."></aegov-radio>
<aegov-radio field-id="pay-crypto" value="crypto" label="Cryptocurrency" is-required="true"></aegov-radio>
</aegov-radio-group>
</template>
import { Component } from '@angular/core';
import { AegovRadioGroup, AegovRadio } from '@aegov/designsystem-angular';
@Component({
selector: 'app-radio-states',
imports: [AegovRadioGroup, AegovRadio],
template: `
<aegov-radio-group name="payment-states" label="Payment method">
<aegov-radio field-id="pay-card" value="card" label="Credit or debit card" [isChecked]="true"></aegov-radio>
<aegov-radio field-id="pay-bank" value="bank" label="Direct bank transfer"></aegov-radio>
<aegov-radio field-id="pay-cash" value="cash" label="Cash at service centre" [isDisabled]="true" hint="Currently unavailable due to system maintenance."></aegov-radio>
<aegov-radio field-id="pay-crypto" value="crypto" label="Cryptocurrency" [isRequired]="true"></aegov-radio>
</aegov-radio-group>
`,
})
export class RadioStatesComponent {}
Sizes
size accepts five tokens, from xs up to xl. It scales the control, the label text, and the hint text together, and accepts a responsive breakpoint string when set on the group (e.g. size="sm md:base").
<aegov-radio field-id="radio-size-xs" name="radio-size-xs" size="xs" label="Extra small" is-checked="true"></aegov-radio>
<aegov-radio field-id="radio-size-sm" name="radio-size-sm" size="sm" label="Small" is-checked="true"></aegov-radio>
<aegov-radio field-id="radio-size-base" name="radio-size-base" size="base" label="Base (default)" is-checked="true"></aegov-radio>
<aegov-radio field-id="radio-size-lg" name="radio-size-lg" size="lg" label="Large" is-checked="true"></aegov-radio>
<aegov-radio field-id="radio-size-xl" name="radio-size-xl" size="xl" label="Extra large" is-checked="true"></aegov-radio>
import { AegovRadio } from '@aegov/designsystem-react';
export default function RadioSizes() {
return (
<>
<AegovRadio fieldId="radio-size-xs" name="radio-size-xs" size="xs" label="Extra small" isChecked />
<AegovRadio fieldId="radio-size-sm" name="radio-size-sm" size="sm" label="Small" isChecked />
<AegovRadio fieldId="radio-size-base" name="radio-size-base" size="base" label="Base (default)" isChecked />
<AegovRadio fieldId="radio-size-lg" name="radio-size-lg" size="lg" label="Large" isChecked />
<AegovRadio fieldId="radio-size-xl" name="radio-size-xl" size="xl" label="Extra large" isChecked />
</>
);
}
<template>
<aegov-radio field-id="radio-size-xs" name="radio-size-xs" size="xs" label="Extra small" is-checked="true"></aegov-radio>
<aegov-radio field-id="radio-size-sm" name="radio-size-sm" size="sm" label="Small" is-checked="true"></aegov-radio>
<aegov-radio field-id="radio-size-base" name="radio-size-base" size="base" label="Base (default)" is-checked="true"></aegov-radio>
<aegov-radio field-id="radio-size-lg" name="radio-size-lg" size="lg" label="Large" is-checked="true"></aegov-radio>
<aegov-radio field-id="radio-size-xl" name="radio-size-xl" size="xl" label="Extra large" is-checked="true"></aegov-radio>
</template>
import { Component } from '@angular/core';
import { AegovRadio } from '@aegov/designsystem-angular';
@Component({
selector: 'app-radio-sizes',
imports: [AegovRadio],
template: `
<aegov-radio field-id="radio-size-xs" name="radio-size-xs" size="xs" label="Extra small" [isChecked]="true"></aegov-radio>
<aegov-radio field-id="radio-size-sm" name="radio-size-sm" size="sm" label="Small" [isChecked]="true"></aegov-radio>
<aegov-radio field-id="radio-size-base" name="radio-size-base" size="base" label="Base (default)" [isChecked]="true"></aegov-radio>
<aegov-radio field-id="radio-size-lg" name="radio-size-lg" size="lg" label="Large" [isChecked]="true"></aegov-radio>
<aegov-radio field-id="radio-size-xl" name="radio-size-xl" size="xl" label="Extra large" [isChecked]="true"></aegov-radio>
`,
})
export class RadioSizesComponent {}
Variant
variant selects the colour family for the rest border, checked fill, and hover halo. On aegov-radio-group, setting variant cascades it to every child that hasn't set its own variant.
| Variant | Rest border / accent | Checked fill |
|---|---|---|
primary |
primary-600 |
primary-600 |
secondary |
secondary-600 |
secondary-600 |
neutral-max |
aeblack-800 |
aeblack-800 |
neutral-min |
aeblack-400 |
aeblack-400 |
Variant example
<aegov-radio field-id="radio-variant-primary" name="radio-variant-primary" variant="primary" is-checked="true" label="Primary"></aegov-radio>
<aegov-radio field-id="radio-variant-secondary" name="radio-variant-secondary" variant="secondary" is-checked="true" label="Secondary"></aegov-radio>
<aegov-radio field-id="radio-variant-neutral-max" name="radio-variant-neutral-max" variant="neutral-max" is-checked="true" label="Neutral-max"></aegov-radio>
<aegov-radio field-id="radio-variant-neutral-min" name="radio-variant-neutral-min" variant="neutral-min" is-checked="true" label="Neutral-min"></aegov-radio>
import { AegovRadio } from '@aegov/designsystem-react';
export default function RadioVariants() {
return (
<>
<AegovRadio fieldId="radio-variant-primary" name="radio-variant-primary" variant="primary" isChecked label="Primary" />
<AegovRadio fieldId="radio-variant-secondary" name="radio-variant-secondary" variant="secondary" isChecked label="Secondary" />
<AegovRadio fieldId="radio-variant-neutral-max" name="radio-variant-neutral-max" variant="neutral-max" isChecked label="Neutral-max" />
<AegovRadio fieldId="radio-variant-neutral-min" name="radio-variant-neutral-min" variant="neutral-min" isChecked label="Neutral-min" />
</>
);
}
<template>
<aegov-radio field-id="radio-variant-primary" name="radio-variant-primary" variant="primary" is-checked="true" label="Primary"></aegov-radio>
<aegov-radio field-id="radio-variant-secondary" name="radio-variant-secondary" variant="secondary" is-checked="true" label="Secondary"></aegov-radio>
<aegov-radio field-id="radio-variant-neutral-max" name="radio-variant-neutral-max" variant="neutral-max" is-checked="true" label="Neutral-max"></aegov-radio>
<aegov-radio field-id="radio-variant-neutral-min" name="radio-variant-neutral-min" variant="neutral-min" is-checked="true" label="Neutral-min"></aegov-radio>
</template>
import { Component } from '@angular/core';
import { AegovRadio } from '@aegov/designsystem-angular';
@Component({
selector: 'app-radio-variants',
imports: [AegovRadio],
template: `
<aegov-radio field-id="radio-variant-primary" name="radio-variant-primary" variant="primary" [isChecked]="true" label="Primary"></aegov-radio>
<aegov-radio field-id="radio-variant-secondary" name="radio-variant-secondary" variant="secondary" [isChecked]="true" label="Secondary"></aegov-radio>
<aegov-radio field-id="radio-variant-neutral-max" name="radio-variant-neutral-max" variant="neutral-max" [isChecked]="true" label="Neutral-max"></aegov-radio>
<aegov-radio field-id="radio-variant-neutral-min" name="radio-variant-neutral-min" variant="neutral-min" [isChecked]="true" label="Neutral-min"></aegov-radio>
`,
})
export class RadioVariantsComponent {}
Orientation
orientation stacks the group's items vertically (default) or lets them wrap horizontally — useful for a compact set of short options such as Yes/No.
<aegov-radio-group name="agree-vertical" label="Do you agree?" orientation="vertical">
<aegov-radio field-id="agree-v-yes" value="yes" label="Yes"></aegov-radio>
<aegov-radio field-id="agree-v-no" value="no" label="No"></aegov-radio>
<aegov-radio field-id="agree-v-unsure" value="unsure" label="Not sure"></aegov-radio>
</aegov-radio-group>
<aegov-radio-group name="agree-horizontal" label="Do you agree?" orientation="horizontal">
<aegov-radio field-id="agree-h-yes" value="yes" label="Yes"></aegov-radio>
<aegov-radio field-id="agree-h-no" value="no" label="No"></aegov-radio>
<aegov-radio field-id="agree-h-unsure" value="unsure" label="Not sure"></aegov-radio>
</aegov-radio-group>
import { AegovRadioGroup, AegovRadio } from '@aegov/designsystem-react';
export default function RadioOrientation() {
return (
<>
<AegovRadioGroup name="agree-vertical" label="Do you agree?" orientation="vertical">
<AegovRadio fieldId="agree-v-yes" value="yes" label="Yes" />
<AegovRadio fieldId="agree-v-no" value="no" label="No" />
<AegovRadio fieldId="agree-v-unsure" value="unsure" label="Not sure" />
</AegovRadioGroup>
<AegovRadioGroup name="agree-horizontal" label="Do you agree?" orientation="horizontal">
<AegovRadio fieldId="agree-h-yes" value="yes" label="Yes" />
<AegovRadio fieldId="agree-h-no" value="no" label="No" />
<AegovRadio fieldId="agree-h-unsure" value="unsure" label="Not sure" />
</AegovRadioGroup>
</>
);
}
<template>
<aegov-radio-group name="agree-vertical" label="Do you agree?" orientation="vertical">
<aegov-radio field-id="agree-v-yes" value="yes" label="Yes"></aegov-radio>
<aegov-radio field-id="agree-v-no" value="no" label="No"></aegov-radio>
<aegov-radio field-id="agree-v-unsure" value="unsure" label="Not sure"></aegov-radio>
</aegov-radio-group>
<aegov-radio-group name="agree-horizontal" label="Do you agree?" orientation="horizontal">
<aegov-radio field-id="agree-h-yes" value="yes" label="Yes"></aegov-radio>
<aegov-radio field-id="agree-h-no" value="no" label="No"></aegov-radio>
<aegov-radio field-id="agree-h-unsure" value="unsure" label="Not sure"></aegov-radio>
</aegov-radio-group>
</template>
import { Component } from '@angular/core';
import { AegovRadioGroup, AegovRadio } from '@aegov/designsystem-angular';
@Component({
selector: 'app-radio-orientation',
imports: [AegovRadioGroup, AegovRadio],
template: `
<aegov-radio-group name="agree-vertical" label="Do you agree?" orientation="vertical">
<aegov-radio field-id="agree-v-yes" value="yes" label="Yes"></aegov-radio>
<aegov-radio field-id="agree-v-no" value="no" label="No"></aegov-radio>
<aegov-radio field-id="agree-v-unsure" value="unsure" label="Not sure"></aegov-radio>
</aegov-radio-group>
<aegov-radio-group name="agree-horizontal" label="Do you agree?" orientation="horizontal">
<aegov-radio field-id="agree-h-yes" value="yes" label="Yes"></aegov-radio>
<aegov-radio field-id="agree-h-no" value="no" label="No"></aegov-radio>
<aegov-radio field-id="agree-h-unsure" value="unsure" label="Not sure"></aegov-radio>
</aegov-radio-group>
`,
})
export class RadioOrientationComponent {}
Appearance
appearance, set on aegov-radio-group, cascades a visual layout to every child radio — list adds separator lines, cards turns each item into a bordered card, and pills renders a toggle-chip with the native input visually hidden (but still accessible). A standalone aegov-radio outside any group always renders default.
<aegov-radio-group name="appearance-list" label="List" appearance="list">
<aegov-radio field-id="app-list-std" value="std" label="Standard"></aegov-radio>
<aegov-radio field-id="app-list-exp" value="exp" label="Express" is-checked="true"></aegov-radio>
</aegov-radio-group>
<aegov-radio-group name="appearance-cards" label="Cards" appearance="cards">
<aegov-radio field-id="app-cards-std" value="std" label="Standard"></aegov-radio>
<aegov-radio field-id="app-cards-exp" value="exp" label="Express" is-checked="true"></aegov-radio>
</aegov-radio-group>
<aegov-radio-group name="appearance-pills" label="Pills" appearance="pills" orientation="horizontal">
<aegov-radio field-id="app-pills-std" value="std" label="Standard"></aegov-radio>
<aegov-radio field-id="app-pills-exp" value="exp" label="Express" is-checked="true"></aegov-radio>
</aegov-radio-group>
import { AegovRadioGroup, AegovRadio } from '@aegov/designsystem-react';
export default function RadioAppearance() {
return (
<>
<AegovRadioGroup name="appearance-list" label="List" appearance="list">
<AegovRadio fieldId="app-list-std" value="std" label="Standard" />
<AegovRadio fieldId="app-list-exp" value="exp" label="Express" isChecked />
</AegovRadioGroup>
<AegovRadioGroup name="appearance-cards" label="Cards" appearance="cards">
<AegovRadio fieldId="app-cards-std" value="std" label="Standard" />
<AegovRadio fieldId="app-cards-exp" value="exp" label="Express" isChecked />
</AegovRadioGroup>
<AegovRadioGroup name="appearance-pills" label="Pills" appearance="pills" orientation="horizontal">
<AegovRadio fieldId="app-pills-std" value="std" label="Standard" />
<AegovRadio fieldId="app-pills-exp" value="exp" label="Express" isChecked />
</AegovRadioGroup>
</>
);
}
<template>
<aegov-radio-group name="appearance-list" label="List" appearance="list">
<aegov-radio field-id="app-list-std" value="std" label="Standard"></aegov-radio>
<aegov-radio field-id="app-list-exp" value="exp" label="Express" is-checked="true"></aegov-radio>
</aegov-radio-group>
<aegov-radio-group name="appearance-cards" label="Cards" appearance="cards">
<aegov-radio field-id="app-cards-std" value="std" label="Standard"></aegov-radio>
<aegov-radio field-id="app-cards-exp" value="exp" label="Express" is-checked="true"></aegov-radio>
</aegov-radio-group>
<aegov-radio-group name="appearance-pills" label="Pills" appearance="pills" orientation="horizontal">
<aegov-radio field-id="app-pills-std" value="std" label="Standard"></aegov-radio>
<aegov-radio field-id="app-pills-exp" value="exp" label="Express" is-checked="true"></aegov-radio>
</aegov-radio-group>
</template>
import { Component } from '@angular/core';
import { AegovRadioGroup, AegovRadio } from '@aegov/designsystem-angular';
@Component({
selector: 'app-radio-appearance',
imports: [AegovRadioGroup, AegovRadio],
template: `
<aegov-radio-group name="appearance-list" label="List" appearance="list">
<aegov-radio field-id="app-list-std" value="std" label="Standard"></aegov-radio>
<aegov-radio field-id="app-list-exp" value="exp" label="Express" [isChecked]="true"></aegov-radio>
</aegov-radio-group>
<aegov-radio-group name="appearance-cards" label="Cards" appearance="cards">
<aegov-radio field-id="app-cards-std" value="std" label="Standard"></aegov-radio>
<aegov-radio field-id="app-cards-exp" value="exp" label="Express" [isChecked]="true"></aegov-radio>
</aegov-radio-group>
<aegov-radio-group name="appearance-pills" label="Pills" appearance="pills" orientation="horizontal">
<aegov-radio field-id="app-pills-std" value="std" label="Standard"></aegov-radio>
<aegov-radio field-id="app-pills-exp" value="exp" label="Express" [isChecked]="true"></aegov-radio>
</aegov-radio-group>
`,
})
export class RadioAppearanceComponent {}
Group disabled
Setting is-disabled="true" on the group disables every child radio via the native <fieldset disabled> mechanism — no per-child changes needed. Turning it back off restores each child's own is-disabled setting.
<aegov-radio-group name="locked" label="This section is locked while the application is under review" is-disabled="true">
<aegov-radio field-id="locked-a" value="a" label="Option A"></aegov-radio>
<aegov-radio field-id="locked-b" value="b" label="Option B" is-checked="true"></aegov-radio>
<aegov-radio field-id="locked-c" value="c" label="Option C"></aegov-radio>
</aegov-radio-group>
import { AegovRadioGroup, AegovRadio } from '@aegov/designsystem-react';
export default function RadioGroupDisabled() {
return (
<AegovRadioGroup
name="locked"
label="This section is locked while the application is under review"
isDisabled
>
<AegovRadio fieldId="locked-a" value="a" label="Option A" />
<AegovRadio fieldId="locked-b" value="b" label="Option B" isChecked />
<AegovRadio fieldId="locked-c" value="c" label="Option C" />
</AegovRadioGroup>
);
}
<template>
<aegov-radio-group name="locked" label="This section is locked while the application is under review" is-disabled="true">
<aegov-radio field-id="locked-a" value="a" label="Option A"></aegov-radio>
<aegov-radio field-id="locked-b" value="b" label="Option B" is-checked="true"></aegov-radio>
<aegov-radio field-id="locked-c" value="c" label="Option C"></aegov-radio>
</aegov-radio-group>
</template>
import { Component } from '@angular/core';
import { AegovRadioGroup, AegovRadio } from '@aegov/designsystem-angular';
@Component({
selector: 'app-radio-group-disabled',
imports: [AegovRadioGroup, AegovRadio],
template: `
<aegov-radio-group name="locked" label="This section is locked while the application is under review" [isDisabled]="true">
<aegov-radio field-id="locked-a" value="a" label="Option A"></aegov-radio>
<aegov-radio field-id="locked-b" value="b" label="Option B" [isChecked]="true"></aegov-radio>
<aegov-radio field-id="locked-c" value="c" label="Option C"></aegov-radio>
</aegov-radio-group>
`,
})
export class RadioGroupDisabledComponent {}
Group validation
is-required, is-invalid, and error-message operate at the group level — validation asks "was at least one option selected?", not "is this specific radio checked?" Set them on aegov-radio-group itself, and give the group its own label so its <fieldset>/<legend> carries a real accessible name; that name is what identifies the group, not any label you may separately give a single field elsewhere in the form.
<aegov-radio-group name="emirate-validation" label="Emirate of residence" is-required="true" is-invalid="true" error-message="Please select your emirate of residence.">
<aegov-radio field-id="emirate-val-ad" value="ad" label="Abu Dhabi"></aegov-radio>
<aegov-radio field-id="emirate-val-dxb" value="dxb" label="Dubai"></aegov-radio>
<aegov-radio field-id="emirate-val-shj" value="shj" label="Sharjah"></aegov-radio>
</aegov-radio-group>
import { AegovRadioGroup, AegovRadio } from '@aegov/designsystem-react';
export default function RadioGroupValidation() {
return (
<AegovRadioGroup
name="emirate-validation"
label="Emirate of residence"
isRequired
isInvalid
errorMessage="Please select your emirate of residence."
>
<AegovRadio fieldId="emirate-val-ad" value="ad" label="Abu Dhabi" />
<AegovRadio fieldId="emirate-val-dxb" value="dxb" label="Dubai" />
<AegovRadio fieldId="emirate-val-shj" value="shj" label="Sharjah" />
</AegovRadioGroup>
);
}
<template>
<aegov-radio-group name="emirate-validation" label="Emirate of residence" is-required="true" is-invalid="true" error-message="Please select your emirate of residence.">
<aegov-radio field-id="emirate-val-ad" value="ad" label="Abu Dhabi"></aegov-radio>
<aegov-radio field-id="emirate-val-dxb" value="dxb" label="Dubai"></aegov-radio>
<aegov-radio field-id="emirate-val-shj" value="shj" label="Sharjah"></aegov-radio>
</aegov-radio-group>
</template>
import { Component } from '@angular/core';
import { AegovRadioGroup, AegovRadio } from '@aegov/designsystem-angular';
@Component({
selector: 'app-radio-group-validation',
imports: [AegovRadioGroup, AegovRadio],
template: `
<aegov-radio-group name="emirate-validation" label="Emirate of residence" [isRequired]="true" [isInvalid]="true" errorMessage="Please select your emirate of residence.">
<aegov-radio field-id="emirate-val-ad" value="ad" label="Abu Dhabi"></aegov-radio>
<aegov-radio field-id="emirate-val-dxb" value="dxb" label="Dubai"></aegov-radio>
<aegov-radio field-id="emirate-val-shj" value="shj" label="Sharjah"></aegov-radio>
</aegov-radio-group>
`,
})
export class RadioGroupValidationComponent {}
RTL support
The radio uses CSS logical properties throughout. When the document or any ancestor is dir="rtl", the control swaps to the end (right) side of the label, hint text aligns right, list dividers and card borders flip inline-end, and pill spacing follows the writing direction — no extra configuration needed. Left/Right arrow keys follow the reading direction too: in RTL, Arrow Left moves to the next option and Arrow Right to the previous one, as native radios do.
<div dir="rtl">
<aegov-radio-group name="processing-rtl" appearance="cards" label="سرعة المعالجة">
<aegov-radio field-id="proc-rtl-standard" value="standard" label="عادية — خلال 5 أيام عمل" hint="مجاناً لمواطني دولة الإمارات." is-checked="true"></aegov-radio>
<aegov-radio field-id="proc-rtl-express" value="express" label="سريعة — خلال يومي عمل" hint="رسوم إضافية بقيمة 100 درهم."></aegov-radio>
</aegov-radio-group>
</div>
import { AegovRadioGroup, AegovRadio } from '@aegov/designsystem-react';
export default function RtlRadio() {
return (
<div dir="rtl">
<AegovRadioGroup name="processing-rtl" appearance="cards" label="سرعة المعالجة">
<AegovRadio
fieldId="proc-rtl-standard"
value="standard"
label="عادية — خلال 5 أيام عمل"
hint="مجاناً لمواطني دولة الإمارات."
isChecked
/>
<AegovRadio
fieldId="proc-rtl-express"
value="express"
label="سريعة — خلال يومي عمل"
hint="رسوم إضافية بقيمة 100 درهم."
/>
</AegovRadioGroup>
</div>
);
}
<template>
<div dir="rtl">
<aegov-radio-group name="processing-rtl" appearance="cards" label="سرعة المعالجة">
<aegov-radio field-id="proc-rtl-standard" value="standard" label="عادية — خلال 5 أيام عمل" hint="مجاناً لمواطني دولة الإمارات." is-checked="true"></aegov-radio>
<aegov-radio field-id="proc-rtl-express" value="express" label="سريعة — خلال يومي عمل" hint="رسوم إضافية بقيمة 100 درهم."></aegov-radio>
</aegov-radio-group>
</div>
</template>
import { Component } from '@angular/core';
import { AegovRadioGroup, AegovRadio } from '@aegov/designsystem-angular';
@Component({
selector: 'app-rtl-radio',
imports: [AegovRadioGroup, AegovRadio],
template: `
<div dir="rtl">
<aegov-radio-group name="processing-rtl" appearance="cards" label="سرعة المعالجة">
<aegov-radio field-id="proc-rtl-standard" value="standard" label="عادية — خلال 5 أيام عمل" hint="مجاناً لمواطني دولة الإمارات." [isChecked]="true"></aegov-radio>
<aegov-radio field-id="proc-rtl-express" value="express" label="سريعة — خلال يومي عمل" hint="رسوم إضافية بقيمة 100 درهم."></aegov-radio>
</aegov-radio-group>
</div>
`,
})
export class RtlRadioComponent {}
Usage
Here is the recommended usage of a radio on any website or application. These are recommended usage guides, however the developer must use the best practices of web and application development to accurately use this component.
Always wrap related radios in aegov-radio-group, and give it a label
This gives the group a shared name (required for correct single-select behaviour) and a <legend> that tells assistive technology the question being asked — not just the individual option text.
Use radios for a small, fixed set of mutually exclusive options — roughly two to seven
For longer lists, a select dropdown scales better. For a single yes/no setting, a toggle is a more familiar interaction model than a two-option radio group.
Pre-select a sensible default with is-checked whenever one exists
A radio group with nothing pre-selected forces every user to make an active choice even when most users want the same, common option — pre-select it and let the minority change it.
Do not use a single standalone radio outside a group
A lone radio has nothing to be mutually exclusive with, which is confusing for anyone using assistive technology — use a checkbox or toggle instead for a single independent option.
API reference
The following are the properties and references of a radio
aegov-radio default properties
| Attribute | Description | Type | Default |
|---|---|---|---|
| DOM id reflected on the inner native |
| auto-generated |
| Reflected on the host so |
| (none) |
| Value identifying this option in form data and in group change events. |
| (none) |
| Whether the radio is selected. |
|
|
| Size token. Accepts a responsive breakpoint string the same way Badge/Banner/Checkbox do, e.g. |
|
|
| Colour family for the rest border, checked fill, and focus outline. |
|
|
| Visual layout set by a parent |
|
|
| Whether the radio is disabled. |
|
|
| Whether the radio must be checked for the form to submit. Use it only on a standalone radio — inside a group, each inner input sits alone in its own shadow root, so every unchecked required radio would report |
|
|
| Label text. When provided, an associated |
| (none) |
| Helper text shown below the label (or beside the bare control when |
| (none) |
| Visual + |
|
|
| Inline error message shown when |
|
|
| Additional CSS classes applied to the internal wrapper. |
| (none) |
This component renders inside a real shadow DOM, so extra-class only applies margin/padding (spacing) utilities — e.g. mt-4, md:px-6. Colour, border, typography, and every other visual utility are silently ignored: this is an isolated component whose internal styles can't be overridden, keeping it visually consistent wherever it's used.
aegov-radio-group default properties
| Attribute | Description | Type | Default |
|---|---|---|---|
| Shared name for every radio in the group, set on each child via JS property assignment. Required — Angular's template compiler enforces this at build time. |
| required |
| Layout for the whole group. |
|
|
| Stack direction for radio items. |
|
|
| Rendered as the group's |
| (none) |
| Cascades to every child radio. Accepts a responsive breakpoint string. |
|
|
| Cascades to every child radio that hasn't set its own |
|
|
| Disables every radio in the group via a native |
|
|
| Aggregate-level only — validates that one child radio is checked. Does not mark individual children as required. Sets |
|
|
| Visual + |
|
|
| Inline error shown below the group when |
|
|
| Helper text shown below the group's items. Stays visible while an error shows — the error renders after it. Use the |
|
|
| Additional CSS classes applied to the internal fieldset wrapper. |
| (none) |
This component renders inside a real shadow DOM, so extra-class only applies margin/padding (spacing) utilities — e.g. mt-4, md:px-6. Colour, border, typography, and every other visual utility are silently ignored: this is an isolated component whose internal styles can't be overridden, keeping it visually consistent wherever it's used.
Events
| Event | Description | Component | Detail |
|---|---|---|---|
| Fired when a single radio's checked state changes. | aegov-radio |
|
| Fired whenever the selected radio in the group changes. Carries the newly-selected value, or | aegov-radio-group |
|
| Unified validation event, fired on blur, change, and manual | both |
|
Methods
| Method | Description | Component |
|---|---|---|
| Imperatively re-runs validation and emits | both |
| Mirrors | both |
Slots
| Slot | Description | Component |
|---|---|---|
(default) | The radio items themselves. | aegov-radio-group |
| Rich markup for the hint, in place of the plain-text | both |
| Rich markup for the error message, in place of the plain-text | both |
Pass-through attributes
| Attribute | Notes | Forwards to |
|---|---|---|
| Forwarded automatically, except | inner |
| Forwarded automatically on both components. | inner |
| Forwarded on | inner |
| Forwarded on | inner |
| Not forwarded on either component. Use | n/a |
| Applied to the host element on both components — stays host-only, never forwarded inward. | host |
Notes
The following notes are applicable of this component.
Built-in accessibility
aegov-radiorenders a real native<input type="radio">, so basic toggling and assistive-technology announcement as a radio button come for free.- Setting
labelwraps the input in a real<label>, so clicking or tapping the text also selects the control — no manualfor/idwiring needed. aegov-radio-grouprenders a native<fieldset>/<legend>pair (withrole="radiogroup") whenlabelis set, giving the whole group a single accessible name without extra ARIA wiring.- Hint and error text are wired to the input (or fieldset) via
aria-describedbyautomatically wheneverhint/error-message(or their slots) are present. The hint stays visible while an error shows, so the description reads the error, then the hint. aegov-radio-groupimplements the WAI-ARIA radio group keyboard pattern: the group is a single tab stop and the arrow keys move both focus and selection between options.- The error region only takes
role="alert"after the user has actually interacted with the field once (blurred it, or interacted with the group), so a validation message present at initial page load is not announced as an interruption.
Developer responsibility
The following is required for a developer to add additionally or pay attention to regarding this component.
- If you omit
label, supplyaria-labeloraria-labelledbyyourself — the component does not fall back to any other accessible name. - Always wrap related radios in
aegov-radio-groupand set the grouplabel— this gives assistive technology the question being asked, not just each option's own text. is-requiredonaegov-radio-groupdoes not block a native form submit, and it shows no error by itself: the group isn't part of the browser's form validation. On submit, callawait group.validate('submit'); if the result isn'tvalid, prevent the submit, seterror-message(for example fromresult.message) andis-invalidon the group, and move focus to the first radio in the group. Clear them when the user makes a choice. See the whole-form validation pattern.- Use radios only for genuinely mutually-exclusive choices among a small, fixed set (roughly two to seven options). For a single instantly-applied on/off setting, use
aegov-toggleinstead; for longer option lists, useaegov-select. - Check colour contrast for any custom
extra-classbackground or text colour against your chosenvariant.
Additional notes
sizeon both components accepts a responsive breakpoint string, the same convention used by Badge, Banner, and Checkbox (e.g.size="sm md:base").appearanceonaegov-radiois written by its parent group and shouldn't be set directly — setappearanceon theaegov-radio-groupinstead. A standalone radio with no parent group always rendersdefault.name/form submission are handled viaElementInternalson the host element, not the inner shadow-DOM<input>— readingradio.nameor checking form data works exactly like a native input. The shadow DOM's own<input>also carries the name (so a required radio can reportvalueMissing), but it never submits anything itself. See the note on keyboard support below for why it matters more here than it does foraegov-checkbox.- Because each radio's inner native
<input>lives in its own shadow root, the inputs never form a group with each other even when their names match, so the browser has no native "radio button group" to apply its own keyboard behaviour to.aegov-radio-groupreimplements mutual exclusivity, the single tab stop and arrow-key navigation in JS instead. See Keyboard support for the resulting behaviour.
Keyboard support
| Key | Function |
|---|---|
| Tab | Moves focus into the group, landing on the selected radio — or the first enabled radio if none is selected. The group is a single tab stop; the next Tab leaves it. |
| Shift + Tab | Moves focus out of the group. Entering the group backwards with nothing selected lands on the last enabled radio, as native radios do. |
| Arrow Down / Arrow Right | Moves focus to the next enabled radio and selects it, wrapping from the last option to the first. In RTL, Arrow Left moves forward instead of Arrow Right. |
| Arrow Up / Arrow Left | Moves focus to the previous enabled radio and selects it, wrapping from the first option to the last. In RTL, Arrow Right moves back instead of Arrow Left. |
| Space | Selects the focused radio and deselects any other radio checked within the same group. |
Arrow keys move focus and change the selection, matching native radios and the WAI-ARIA radiogroup pattern. Disabled radios are skipped. Because moving through the options selects each one, don't trigger consequential side effects on aegovRadioGroupChange.