Skip to content

Radio โ€‹

A single radio option used standalone or as part of a group sharing the same model-value. Sizes, color variants, optional description, and slot-overridable label and description text. Toggle Vue / CSS to switch the live demo and source together.

Basic โ€‹

Single radio option with a label.

Vue SFC

Group โ€‹

Multiple radios sharing one model-value.

Vue SFC

Sizes โ€‹

Small, medium and large.

Vue SFC

With input โ€‹

Each step sits directly below a mono-input of the same size, which is where a mismatch shows up first. The circle tracks the shared --theme-control-height-* token at half height โ€” identical to mono-checkbox at every step โ€” and the label, description and gap scale with it.

Vue SFC

Colors โ€‹

All built-in color variants.

Vue SFC

States โ€‹

Disabled and pre-selected.

Vue SFC

Description โ€‹

Radio with a secondary description line.

Vue SFC

Slots โ€‹

Custom label and description via named slots.

Vue SFC

Event: change โ€‹

Listen to mno-change to react to selection.

Vue SFC

Event log โ€‹

Live log of mno-change events.

Vue SFC

Customized โ€‹

Override per-element styling with cssClass (Vue) or utility classes (CSS).

Vue SFC

Card recipe โ€‹

Compose a card-style radio with your own CSS โ€” the library ships no helper.

Vue SFC

CSS Variables โ€‹

Vue SFC

Every radio is themed through --mono-radio-* custom properties. Setting one on the element, on any wrapper/ancestor, or inline all work โ€” custom properties inherit, and they pierce the shadow-DOM boundary, so the same overrides apply to <mono-radio> and the shadow build. The color prop sets the accent, but an explicit --mono-radio-accent override always wins. To re-skin globally, set the underlying --theme-* tokens.

VariableDefaultControls
--mono-radio-accentprimaryRing border + dot when selected (set by color)
--mono-radio-border#d1d5dbCircle border color
--mono-radio-border-hover#9ca3afCircle border on hover
--mono-radio-bg#ffffffCircle background
--mono-radio-shadow0 1px 2px โ€ฆCircle shadow
--mono-radio-ringprimary 20%Focus-visible ring color
--mono-radio-text#1f2937Label text color
--mono-radio-description#6b7280Description text color
--mono-radio-border-width2px (1.5px at xs/sm)Circle border width
--mono-radio-gap0.75rem at md, 0.375rem โ†’ 1.125rem across the scaleGap between control and label

The circle itself is not a variable: it is always half of --theme-control-height-* for the current size โ€” identical to mono-checkbox at every step โ€” so a radio stays proportional to an input or select beside it. The dot is half the circle's inner area. Label and description sizes track --theme-title-font-* / --theme-subtitle-font-* per step.

Types โ€‹

Importimport { RadioProps } from 'mono-helper'
PropValueDefaultDescription
valuenull | string | number | booleanโ€”The value this radio represents within its group.
modelValuenull | string | number | booleanโ€”The currently selected value of the radio group.
color'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info'โ€”Color theme applied to the radio.
size'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'โ€”Visual size of the radio.
disabledbooleanโ€”Disables the radio, preventing selection.
labelstringโ€”Text label shown beside the radio.
descriptionstringโ€”Secondary description text shown below the label.
cssClassRadioCssClassโ€”Custom CSS classes applied to internal radio parts.
ariaLabelTextstringโ€”Accessible label used when no visible label is present.
ariaLabelstringโ€”โ€”
visiblebooleanโ€”Whether the control is shown. Defaults to `true`.
visibleType'invisible' | 'none'โ€”How it hides when `visible` is `false`. Defaults to `'none'`.