RadioGroup

Form & Input
stable

Groups multiple Radio inputs under a single v-model with optional label, validation messages and SelectionControlGroup layout.

Structure

Anatomy

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

Anatomy of OrigamRadioGroupSchematic of the RadioGroup component with 5 numbered internal parts. Label (group) Radio item 1 Radio item 2 messages / error 1 2 3 4 5
Anatomy of <origam-radio-group> — 5 internal parts. The OrigamInput root ① wraps the group label ②, the SelectionControlGroup ③ with each Radio item ④ and the messages area ⑤.
1.origam-radio-group
Root element. Delegates to OrigamInput to manage label, error and messages.
2.origam-label (group label)
Group-level label rendered via OrigamLabel with the label prop. Hidden when label is absent.
3.origam-selection-control-group
Inner SelectionControlGroup wrapped in DefaultsProvider that propagates color, density and size to all child Radios.
4.origam-radio (per item)
Each individual OrigamRadio rendered from the items array or the #item slot.
5.origam-messages
Validation messages and hints area. Rendered by OrigamInput below the controls.

API

Props

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

id
string
HTML id for the group root. Auto-generated as radio-group-{uid} when not provided.
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
active
boolean | IStateEffectConfig
label
string
Group-level label rendered above the radio controls via OrigamLabel.
Size propagated to all Radio controls via DefaultsProvider.
value
any
disabled
boolean
false
Disables all radio inputs in the group.
height
number | string
width
number | string
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
focused
boolean
valueComparator
(a: any, b: any) => boolean
messages
Array<string> | string
color
Intent or custom color propagated to all Radio controls in the group via DefaultsProvider.
bgColor
Background color propagated to all Radio controls.
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
false
Applies a border to the group wrapper.
borderColor
string
Border-radius override for the group wrapper.
elevation
TElevation
Box-shadow elevation token applied to the group root.
padding
boolean | number | string
Shorthand CSS padding applied to the group root.
margin
boolean | number | string
Shorthand CSS margin applied to the group root.
error
string | boolean
inline
boolean
false
Renders the radio controls in a horizontal row instead of a vertical column.
multiple
boolean
modelValue
any
Currently selected value. Bound with v-model. Updated when a Radio in the group is selected.
errorMessages
Array<string> | string
maxErrors
number | string
name
string
Name attribute propagated to all Radio inputs inside the group.
readonly
boolean
false
Makes all radio inputs non-interactive without disabling them visually.
rules
Array<any>
validateOn
TValidateOn
validationValue
any
fontSize
TFontSize
fontWeight
TFontWeight
lineHeight
TLineHeight
hint
string
type
string
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
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
borderTop
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
hover
boolean | IStateEffectConfig
density
'default'
Adjusts the vertical padding density of all Radio controls in the group.
activeClass
string
hoverClass
string
centerAffix
boolean
hideDetails
boolean | string
hideSpinButtons
boolean
persistentHint
boolean
direction
TDirection
appendAvatar
string
appendIcon
TIcon
prependAvatar
string
prependIcon
TIcon
prependAriaLabel
string
appendAriaLabel
string
required
boolean
false
Marks the field as required and shows a required indicator on the label.
falseIcon
TIcon
trueIcon
TIcon
ripple
boolean | { class: string }
items
Array<any> | Record<string, any>
[]
Array of items passed to SelectionControlGroup. Each item is spread onto an OrigamRadio as props.

API

Slots

Content slots exposed by this component.

#default
Replaces the entire inner layout (label + controls + messages). Receives the Input context.
#label
Custom label replacing the default OrigamLabel above the group.
#item
Custom item template for each radio in the group. Replaces the default OrigamRadio per item.

API

Emits

Events emitted by this component.

@update:modelValue
any
Emitted when the user selects a Radio in the group. Carries the selected value.

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.
ComputedRef<string>
Computed group id (prop or auto-generated radio-group-{uid}).
() => 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 each circular radio input visual. Inherited from radio tokens.
Border color of unchecked radio inputs.
Fill color of the selected dot. Overridden by the color prop.
Gap between radio items in the group.
Density modifier: compact → -8px, comfortable → +8px.

Inclusion

Accessibility

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

ARIA roles

radiogroup

Keyboard interactions

Keyboard interactions
KeyAction
SpaceSelects the focused Radio inside the group.
TabMoves focus to the next interactive element.
Arrow keysNavigates between Radio options within the group.

Notes

  • The SelectionControlGroup is rendered with role="group". When a label is present, aria-labelledby is set to the label id so screen readers announce the group name.
  • aria-describedby links the group to the messages/errors area rendered by OrigamInput below the controls.
  • The disabled prop is propagated to all Radio inputs via DefaultsProvider. Each native input receives the disabled attribute.

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 group

vue

Inline layout

vue

Custom item slot

vue

Ecosystem

Family

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