RadioBtn

Form & Input
stable

Individual radio button control wrapping OrigamSelectionControl with type="radio" and animated dot icon.

Preview

Rendering the live preview…

unchecked

Rendering the live preview…

checked

Rendering the live preview…

disabled

Rendering the live preview…

error

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamRadioBtnSchematic of the RadioBtn component delegating to OrigamSelectionControl. Label / #default slot 1 2 3 4 origam-radio-btn → origam-selection-control
Anatomy of <origam-radio-btn> — 4 internal parts: the selection-control root ①, the radio ring ②, the selection dot ③, and the label area ④.
1.origam-radio-btn
Root class applied to the OrigamSelectionControl wrapper. Delegates all rendering to the selection-control via filterProps.
2.origam-selection-control__input (ring)
Circular ring. Border-color transitions from border.default → action.primary.bg when checked. 20 × 20 px, border-radius: full.
3.origam-selection-control__input (dot)
Inner dot (10 × 10 px). Animates from scale(0) → scale(1) on check. Background-color: action.primary.bg.
4.origam-selection-control__label
Label text area. Color: text.primary. Renders the label prop or #default slot.

API

Props

All props accepted by this component, with their type, default value and description.

id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
label
string
Text label rendered next to the radio button. Can also use the #default slot.
trueValue
any
falseValue
any
value
any
Value emitted when the radio is selected. Used for group comparison.
required
boolean
false
Marks the underlying input as required.
disabled
boolean
false
Disables the radio button. Sets aria-disabled and reduces opacity.
error
string | boolean
false
Applies error state styling (danger color) to the radio and label.
name
string
HTML name attribute forwarded to the underlying <input>. Used for native form grouping.
readonly
boolean
false
Makes the radio non-interactive without applying disabled styling.
type
string
modelValue
any
Bound value. When modelValue equals value prop, the radio is checked.
valueComparator
(a: any, b: any) => boolean
falseIcon
'mdi-radiobox-blank'
Icon shown when the radio is unchecked.
trueIcon
'mdi-radiobox-marked'
Icon shown when the radio is checked.
multiple
boolean
false
When true, uses array-based modelValue (not typical for radio).
inline
boolean
false
Renders the control inline (display: inline-flex) instead of block.
color
Active state color of the radio ring and dot. Defaults to primary via token.
bgColor
TColor
hover
boolean | IStateEffectConfig
hoverClass
string
density
'default'
Adjusts padding density of the control.
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
borderTop
boolean | number | string
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderColor
string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
rounded
boolean | number | string | TRounded | null | undefined
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
elevation
TElevation
ripple
boolean | { class: string }
true
Enables the Material ripple effect on click.

API

Slots

Content slots exposed by this component.

#default
Label content. Overrides the label prop.
#input
Custom input element slot. props contains the native input attributes, icon is the current icon, model is the reactive value.
#label
Custom label slot. Replaces the label text area.

API

Emits

Events emitted by this component.

@update:modelValue
any
Fired when the radio is selected. Payload is the value prop.
@click:label
MouseEvent
Fired when the label text is clicked. Forwarded from OrigamSelectionControl.
@focus
FocusEvent
Fired when the underlying input receives focus.
@blur
FocusEvent
Fired when the underlying input loses focus.

API

Exposed members

Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to SelectionControl.
Ref<string>
Reactive CSS string generated by useStyle.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet.
() => void
Removes the injected style sheet.
Ref<boolean>
True once the style sheet has been injected.

Customisation

CSS variables

CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.

Width and height of the radio ring.
Ring border color in unchecked state.
Ring border color when checked.
Ring border color when disabled.
Ring border color in error state.
Diameter of the inner selection dot.
Background color of the inner dot when selected.
Font size of the label text.
Overall opacity of the control when disabled.

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

ARIA roles

radio

Keyboard interactions

Keyboard interactions
KeyAction
SpaceSelects the radio button when focused.
TabMoves focus to the next interactive element.
Arrow Up / Arrow DownNavigates between radios in a group (native browser behaviour on <input type="radio">).

Notes

  • The underlying <input type="radio"> provides native radio behaviour: keyboard navigation, grouping via name, and correct role="radio" without any ARIA additions.
  • The label is associated with the input via <label> — clicking the label text activates the radio.
  • When disabled=true, the native disabled attribute is set on the input. No aria-disabled is needed.
  • Error state applies visual styling only. Connect an aria-describedby to an error message element for full accessibility.

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Basic radio group

vue

Colored radios

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.