RadioBtn

Form & Input
stable

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

Aperçu

Rendu de l’aperçu en cours…

unchecked

Rendu de l’aperçu en cours…

checked

Rendu de l’aperçu en cours…

disabled

Rendu de l’aperçu en cours…

error

Structure

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

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

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et 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

Emplacements de contenu exposés par ce composant.

#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

Événements émis par ce composant.

@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

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

<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.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

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

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Rôles ARIA

radio

Interactions clavier

Interactions clavier
ToucheAction
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.

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Basic radio group

vue

Colored radios

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.