Radio

Form & Input
stable

Single-selection radio control with label, error and focus state support. Wraps OrigamRadioBtn inside OrigamInput.

Preview

Rendering the live preview…

default

Rendering the live preview…

checked

Rendering the live preview…

success

Rendering the live preview…

danger

Rendering the live preview…

disabled

Structure

Anatomy

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

Anatomy of OrigamRadioSchematic of the Radio component with 5 numbered internal parts. Label text 1 2 3 4 5
Anatomy of <origam-radio> — 5 internal parts: the Input wrapper ①, the SelectionControl ②, the circular input ③, the selection dot ④, and the label ⑤.
1.origam-radio
Root element. Wraps OrigamInput providing messages, error and label orchestration.
2.origam-selection-control
Inner SelectionControl hosting the ripple zone, the native input and the label.
3.origam-selection-control__input
Circular input zone with the ripple directive. Contains the native .
4.origam-radio__dot (via MDI icon)
Checked-state dot rendered by the trueIcon (mdi-radiobox-marked). Scales with size.
5.origam-selection-control__label
Label container. Renders OrigamLabel with color and for wiring.

API

Props

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

id
string
HTML id for the input element. Auto-generated if not provided.
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
centerAffix
boolean
hideDetails
boolean | string
hideSpinButtons
boolean
hint
string
persistentHint
boolean
messages
Array<string> | string
density
'default'
Adjusts the vertical padding density of the control wrapper.
padding
boolean | number | string
Shorthand CSS padding applied to the radio root.
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
margin
boolean | number | string
Shorthand CSS margin applied to the radio root.
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
Border-radius override for the radio control wrapper.
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
color
Intent or custom color applied to the checked state icon and dot.
bgColor
TColor
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
false
Applies a border to the control wrapper.
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
elevation
TElevation
Box-shadow elevation token applied to the radio root.
height
number | string
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string
direction
TDirection
disabled
boolean
false
Disables the radio control. Sets aria-disabled and prevents interaction.
error
string | boolean
errorMessages
Array<string> | string
maxErrors
number | string
name
string
Name attribute passed to the underlying input for form grouping.
readonly
boolean
false
Makes the radio non-interactive without disabling it visually.
rules
Array<any>
modelValue
any
Current selected value. Bound with v-model.
validateOn
TValidateOn
validationValue
any
focused
boolean
appendAvatar
string
appendIcon
TIcon
prependAvatar
string
prependIcon
TIcon
prependAriaLabel
string
appendAriaLabel
string
size
TSize | number
fontSize
TFontSize
fontWeight
TFontWeight
lineHeight
TLineHeight
label
string
Label text rendered next to the radio control.
trueValue
any
The value to set on the model when this radio is selected.
falseValue
any
The value to set on the model when this radio is unchecked (rarely used for radios).
value
any
Value used when this radio is part of a group (RadioGroup). Replaces trueValue in group context.
required
boolean
false
Marks the field as required and shows a required indicator on the label.
type
string
valueComparator
(a: any, b: any) => boolean
falseIcon
TIcon
trueIcon
TIcon
multiple
boolean
inline
boolean
hover
boolean | IStateEffectConfig
hoverClass
string
ripple
boolean | { class: string }
active
boolean | IStateEffectConfig
false
Forces the control into its active/pressed visual state.
activeClass
string

API

Slots

Content slots exposed by this component.

#default
Replaces the entire inner layout (RadioBtn + messages). Receives the input context.
#input
Custom input surface replacing the default radio icon. Receives all interaction props.
#label
Custom label content replacing the default OrigamLabel.
#details
Custom details area (hint, counter, error detail).
#messages
Custom messages/errors area below the control.
#message
#prepend
Content prepended before the radio control.
#append
Content appended after the radio control.

API

Emits

Events emitted by this component.

@update:modelValue
any
Emitted when the user selects this radio. Carries the trueValue (or value in group context).
@update:focused
any
@focus
FocusEvent
Fired when the radio input receives focus.
@click:label
MouseEvent
Fired when the user clicks the label area. Propagated from the inner OrigamRadioBtn.
@blur
FocusEvent
Fired when the radio 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 sub-components.
Ref<string>
Reactive CSS string generated by useStyle from the computed radioStyles.
string
Computed input id (prop or auto-generated).
() => void
Injects the computed style sheet. Called automatically on mount.
() => void
Removes the injected style sheet. Called automatically on unmount.
Ref<boolean>
True once the style sheet has been injected into the DOM.
string
Unique style-sheet ID for this instance.

Customisation

CSS variables

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

Diameter of the circular radio input visual.
Border color of the unchecked radio.
Border color when the radio is checked.
Border color when the radio is disabled.
Diameter of the inner dot rendered when checked.
Background color of the inner dot.
Density modifier offset: compact → -8px, comfortable → +8px.

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 when focused.
TabMoves focus to the next interactive element.
Arrow keys (in group)Navigates between radio options in a RadioGroup.

Notes

  • When disabled, aria-disabled="true" is set on the native input. Pointer events are suppressed via CSS.
  • The label is associated with the input via the for/id pair managed by OrigamLabel. Clicking the label activates the control.
  • RadioGroup sets aria-labelledby and aria-describedby on the group container for screen-reader announcements.

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 usage

vue

Colors & states

vue

RadioGroup

vue

Ecosystem

Family

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