Skip to content
Theme:

Ui3nRadioGroup ​

Radio button and radio group components for single selection from multiple options.

Ui3nRadio ​

Single radio button component.

Props

NameTypeDefaultDescription
idstring | undefined —

Root element id

namestring | undefined —

HTML name attribute for form submission (used if radio is outside a group)

modelValueUi3nRadioValue | undefinedfalse

Current radio value

checkedValueUi3nRadioValue | undefinedtrue

Value when radio is checked

uncheckedValueUi3nRadioValue | undefinedfalse

Value when radio is unchecked

sizestring | number | undefined"16"

Radio size

colorstring | undefined"var(--color-icon-control-accent-default)"

Radio color

disabledboolean | undefinedfalse

Whether radio is disabled

Events

Event NameArguments / Value TypeDescription
update:modelValuevalue: Ui3nRadioValue —
changevalue: Ui3nRadioValue —

Slots

Slot NameScope Props (v-slot)Description
#checkedIcon —

Checked icon slot

#uncheckedIcon —

Unchecked icon slot

#default —

Default slot

Public Methods & Exposes

Method NameSignature / TypeDescription
clear()() => void —

CSS Variables

Set any of these where you need it — on :root, on a container, or on the element itself through [data-ui3n] — and the component follows. Leave them alone and it uses the defaults below.

NameDefault
--ui3n-radio-color-disabledvar(--color-icon-control-primary-disabled)
--ui3n-radio-min-height24px
--ui3n-radio-size16px

Ui3nRadioGroup ​

Radio group component for managing multiple radio buttons.

Props

NameTypeDefaultDescription
idstring | undefined —

Root element id

name*string —

Radio group name

modelValue*Ui3nRadioValue —

Current radio group value

direction"horizontal" | "vertical" | undefined"vertical"

Radio group direction

disabledboolean | undefinedfalse

Whether radio group is disabled

Events

Event NameArguments / Value TypeDescription
update:modelValuevalue: Ui3nRadioValue —
changevalue: Ui3nRadioValue —

Slots

Slot NameScope Props (v-slot)Description
#default —

Default slot

Public Methods & Exposes

Method NameSignature / TypeDescription
clear()() => void —

Usage Examples ​

Simple radio ​

Simple radio

Basic radio button usage

I accept the user license agreement

Agreement state: Rejected

Radio group ​

Radio group

Radio buttons grouped together

Apple
Banana
Cherry

Selected: apple

Horizontal radio group ​

Horizontal radio group

Radio group with horizontal direction

Red
Green
Blue

Selected: red

Custom icons slot ​

Custom icons slot

Radio buttons with custom icons for checked and unchecked states using slots

I love this design
Public visibility active

Selected value: like