Skip to content

RadioButton ​

Custom radio button component. Use a shared v-model and unique value props to group radios — only one can be selected at a time.

Live Demo ​

Selected plan: monthly

Hide Label ​

The label is visually hidden but still announced by screen readers.

Selected size: md

Usage ​

vue
<template>
  <orio-radio-button v-model="plan" name="plan" value="monthly">Monthly</orio-radio-button>
  <orio-radio-button v-model="plan" name="plan" value="yearly">Yearly</orio-radio-button>
  <orio-radio-button v-model="plan" name="plan" value="lifetime">Lifetime</orio-radio-button>
</template>

<script setup>
import { ref } from 'vue'

const plan = ref('monthly')
</script>

Props ​

PropTypeDefaultDescription
modelValueunknown-Shared group value (v-model); radio is checked when it matches value
valueunknown-The value this radio represents
namestring-HTML name attribute — groups radios for keyboard nav and form submission
textstring-Inline label text (alternative to default slot)
hideLabelbooleanfalseVisually hides the label while keeping it accessible to screen readers

Events ​

EventPayloadDescription
update:modelValueunknownEmitted when the radio is selected

Slots ​

SlotPropsDescription
default-Label text / content (overrides text prop)