← All Components
<mth-radio>
Accessible radio option designed for composition inside <mth-radio-group>.
When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.
Live Interactive Preview
Ready · interact with <mth-radio>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/radio"></script>
<mth-radio>Example</mth-radio>import '@methane-ui/ui/radio';
import '@methane-ui/react';
export function Example() {
return <mth-radio>Example</mth-radio>;
}<script setup lang="ts">
import '@methane-ui/ui/radio';
</script>
<template>
<mth-radio>Example</mth-radio>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/radio';
import { MthRadioDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthRadioDirective],
template: `<mth-radio>Example</mth-radio>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/radio';
import MthRadio from '@methane-ui/svelte/MthRadio.svelte';
</script>
<MthRadio>Example</MthRadio>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
value | value | string | "" | Value submitted by the parent radio group when selected. |
checked | checked | boolean | false | Whether this radio option is currently selected. |
disabled | disabled | boolean | false | Disables this individual radio option. |
label | label | string | "" | Fallback label text when default slot is empty. |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-radio-select | { value: string } | Fired when user clicks or presses Space on the radio option. |
APG Keyboard Matrix
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
both | focused and not disabled | emits selection intent for this radio option |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | Focus ownership matches focusModel="host" with host role="radio". | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| keyboard | Implements all 1 APG keyboard transitions across LTR/RTL. | mth-radio.spec.test.ts |
| states | Exposes ElementInternals CustomStateSet flags: :state(checked), :state(disabled). | Conformance suite |
| i18n | Routes 1 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |