Radio

Choose exactly one option from a related group.

Radio

Radio options (default)

RadioGroup animates the default dot between selected options in both regular and button presentations. Set :animated="false" to disable dot travel. Reduced-motion preferences disable travel automatically; custom icons keep their own animation.

Radio is the primitive option. RadioGroup owns one selected value, RadioGroupTabs preserves one selection per tab, and type="button" provides the borderless RadioButton segmented presentation. All four forms keep an explicit v-model data flow.

Direction and dot motion

Motion is enabled by default. Configure it with app.use(SaxDesignVue, { radioGroup: { animated: true } }) or <s-config-provider :radio-group="{ animated: true }">; the same object also accepts direction. Explicit component props take precedence, and :animated="false" disables motion for one group.

Set direction="horizontal" or direction="vertical" to choose the arrangement. A horizontal jump from option 1 to 4 visits options 2 and 3; vertical movement bows left before landing on its target, both upward and downward. Intermediate options are visual waypoints: the selected value and change event update only once. Disabled options are skipped, and rapid changes continue from the dot’s current position.

Size

Compare the inherited small, radio, and large component sizes.

Disabled

Set disabled to prevent interaction while preserving the selected state. Enabled controls use a tinted surface and soft shadow; only the circle lifts on hover. Disabled controls use a neutral fill and inset shadow with a visible selection dot. Labels and rows remain stationary.

Color

Use the color prop to change the base color of a component and supported child elements. See theme configuration for color and theme details.

Supported values:

  • primary
  • success
  • danger
  • warning
  • dark
  • RGB
  • HEX

Label

Add a label to the radio with the radio slot, if you need the label to be before the radio you can use the label-before property

Loading

Loading replaces the radio control with the shared Sax logo loader while keeping the label in place. When loading ends, its colored strands clear at four points before the radio icon returns. Interaction stays disabled until this short exit finishes; an unfinished lead-in completes first.

Icon

The outer disc and default center dot share one SVG coordinate system, independent from the native input and positional layout. Replace the selected center SVG with the icon slot, which exposes checked. icon-animation="auto" draws stroked SVG geometry and traces filled SVG contours before revealing the fill; set draw, pop, or none explicitly when needed.

API

PROPS

Property
Type
Values
Description
default
Example
More
size
small | medium | large
Set or inherit the radio control size; Radio Group passes it to descendants.
—
—
v-model
String | Number | Boolean
selected radio value
Bind the selected value for the radio or radio group.
—
color
String
primary | success | danger | warn | warning | dark | text | light | secondary | RGB | RGBA | HEX | HSL | HSLA
Change the color of the radio.
primary
disabled
Boolean
truefalse
Disable radio interaction while preserving the selected state.
false
loading
Boolean
truefalse
Determine if the component has a loading animation and is disabled.
false
icon-animation
String
autodrawpopnone
Animate a custom center icon. Stroke SVGs draw their paths and filled SVGs trace their contours before filling in. Use pop explicitly for a pop reveal.
auto
value
String | Number | Boolean
option value
Value represented by this radio option.
''

RadioGroup props

Property
Type
Description
default
Example
More
direction
'horizontal' | 'vertical'
Explicit arrangement for regular and button groups. Overrides columns; when omitted, preserves the existing columns/button layout. Horizontal dot travel visits intermediate enabled options; vertical travel follows a leftward arc to the target.
—
animated
boolean
Animate the default dot between accepted selections in Radio and RadioButton groups. Enabled by default; inherits global radioGroup.animated unless explicitly overridden. Respects reduced-motion preferences.
true
size
Set or inherit the size of RadioGroup and its options.
—
v-model
The group's single selected value.
''
options
[]
Data-driven options supporting `label`, `value`, `description`, and `disabled`.
[]
type
default | button
Primitive Radio or borderless RadioButton presentation.
default
columns
number
Column count for the standard data-driven layout; collapses to one column on small screens.
1
gap
number | string
Option spacing. Numbers are treated as pixels.
8
disabled-values
[]
Disable specific option values.
[]
disabled
boolean
Disable the whole group.
false
name
string
Shared native radio name for arrow-key navigation.
generated

RadioGroupTabs props

Property
Type
Description
default
Example
More
v-model
Stores one selected value under each tab key.
{}
tabs
[]
Tabs and their `options`; each tab may define `disabled`, `columns`, and disabled option values.
[]
v-model:active-key
Two-way binding for the active tab key.
—
columns
number
Panel column count when a tab does not override it.
2
gap
number | string
Spacing between panel options.
12
disabled
boolean
Disable the whole tabbed group.
false

RadioButton props

Property
Type
Description
default
Example
More
v-model
Two-way selected value when using RadioButton directly.
—
value
Value represented by this button.
''
label
String | Number | Boolean
Visible option label.
''
description
String
Supporting text shown beneath the label.
''
disabled
Boolean
Disable this button without losing its selected state.
false
name
String
Shared native radio name when composing buttons directly.
''

EVENTS

Event
Type
Description
default
Example
More
update:modelValue
Fire when a Radio, RadioGroup, or RadioButton value changes.
—
—
change
Fire when a Radio, RadioGroup, or RadioButton value changes.
—
—
update:activeKey
String | Number
Fire when RadioGroupTabs activates another tab.
—
—
tabChange
String | Number
Fire when RadioGroupTabs activates another tab.
—
—
RadioGroupTabs change
(value: , activeKey: String | Number)
Fires with the complete grouped value and active tab after a tabbed selection changes.
—
—

SLOTS

Slot
Scope
Description
default
Example
More
RadioGroup.default
—
Compose Radio or RadioButton children manually when options is omitted.
—
RadioGroup.option
{ option: ; checked: boolean }
Customize a data-driven radio option.
—
RadioGroup.empty
—
Render content when no options or manual children are available.
—
RadioGroupTabs.tab
{ tab: ; active: boolean; selected: boolean; selectedOption?: }
Customize a tab trigger using its active and selection state.
—
RadioGroupTabs.option
{ option: ; checked: boolean }
Customize an option in the active tab.
—
RadioGroupTabs.empty
—
Render content when no active tab is available.
—
default
null
Add a label to the component.
—
icon
{ checked: boolean }
Replace the selected center SVG and receive the current checked state.
—
Last Updated: 2026-10-28, 06:17:56 UTC
Copied