Primitives
11

RadioGroup

Radios that are actually a group: they share one name, so the browser makes them mutually exclusive and gives arrow-key navigation — which moves *and* selects — for free. A <fieldset role="radiogroup"> with a <legend> announces the group name with every option.

plain markup — no library on the page
rendered by aura-react
rendered by aura-vue
rendered by aura-svelte
built from aura-angular's own class helpers
Density
Density
Density
Density
Density

Code

index.html
<fieldset role="radiogroup" class="aura-fieldset">
  <legend>Density</legend>
  <label class="aura-check">
    <input type="radio" class="aura-radio" name="density" value="comfortable" checked />
    <span>Comfortable</span>
  </label>
  <label class="aura-check">
    <input type="radio" class="aura-radio" name="density" value="compact" />
    <span>Compact</span>
  </label>
  <label class="aura-check">
    <input type="radio" class="aura-radio" name="density" value="auto" disabled />
    <span>Match system</span>
  </label>
</fieldset>
Demo.tsx
import { RadioGroup } from '@ilomee/aura-react';

const OPTIONS = [
  { value: 'comfortable', label: 'Comfortable' },
  { value: 'compact', label: 'Compact' },
  { value: 'auto', label: 'Match system', disabled: true },
];

export default function Demo() {
  // `name` is pinned here so every stack renders the same markup — left out, each framework
  // would generate its own id and the cross-stack diff would have nothing to compare.
  return <RadioGroup label="Density" name="density" options={OPTIONS} defaultValue="comfortable" />;
}
Demo.vue
<script setup lang="ts">
import { ref } from 'vue';
import { RadioGroup } from '@ilomee/aura-vue';

const density = ref('comfortable');
</script>

<template>
  <RadioGroup
    v-model="density"
    label="Density"
    :options="[
      { value: 'comfortable', label: 'Comfortable' },
      { value: 'compact', label: 'Compact' },
    ]"
  />
</template>
Demo.svelte
<script lang="ts">
  import { RadioGroup } from '@ilomee/aura-svelte';

  let density = $state('comfortable');
</script>

<RadioGroup
  bind:value={density}
  label="Density"
  options={[
    { value: 'comfortable', label: 'Comfortable' },
    { value: 'compact', label: 'Compact' },
  ]}
/>

Used as aura-radio-group.

demo.component.ts
import { AuraRadioGroup } from '@ilomee/aura-angular';

@Component({
  standalone: true,
  imports: [AuraRadioGroup],
  template: `<aura-radio-group
    label="Density"
    [options]="options"
    [(value)]="density"
  />`,
})
export class DemoComponent {
  density = 'comfortable';
  options = [
    { value: 'comfortable', label: 'Comfortable' },
    { value: 'compact', label: 'Compact' },
  ];
}

Props

Plain markup has no props — the classes below are the whole API. The four packages do nothing more than set these same classes for you.
NameTypeDefaultNotes
labelstringRendered as the <legend>.
namestringThe generated id comes from the framework itself, so it is stable across SSR and hydration.
optionsAuraOption[] | null
valuestring
defaultValuestring''
onValueChange(value: string) => void
disabledboolean
NameTypeDefaultNotes
labelstring
namestringThe generated id comes from the framework itself, so it is stable across SSR and hydration.
optionsAuraOption[] | null
modelValuetwo-waystring
defaultValuestring''
disabledbooleanfalse
update:modelValueevent(value: string) => void
NameTypeDefaultNotes
labelstring
namestringThe generated id comes from the framework itself, so it is stable across SSR and hydration.
optionsAuraOption[] | null
valuetwo-waystring''
disabledbooleanfalse
onchange(value: string) => void
NameTypeDefaultNotes
labelstring
namestring
optionsAuraOption[] | null[]
valuestring''
disabledbooleanfalse
valueChangeeventEventEmitter<string>

Emitted classes

Every framework emits the same classes — that is what makes the four libraries look identical. You can use them directly, without any component library.

ClassRoleNotes
.aura-fieldsetbaseRequired. A modifier does nothing without it.
.aura-radiobaseRequired. A modifier does nothing without it.
.aura-checkbaseRequired. A modifier does nothing without it.

Tokens and rules

components.css
dot
var(--radio-size) · 999px
selected
var(--accent)
frame
var(--field-border) · var(--r2)
keyboard
native — arrows move and select