DDS/Components/Radio Group

Radio Group

Form

A group of radio buttons for single-choice selection, with vertical/horizontal layout and card mode.

Props

PropTypeDefaultDescription
modelValuestring | number | nullSelected value (v-model).
optionsDsRadioOption[]Array of options with label, value, description?, disabled?.
orientation'vertical' | 'horizontal''vertical'Layout direction.
cardbooleanfalseCard-style bordered display.
disabledbooleanfalseDisable all options.
namestringName attribute for the radio group.

Examples

Vertical (default)
vue
<script setup lang="ts">
const plan = ref('pro')
const options = [
  { label: 'Starter', value: 'starter', description: 'For individuals' },
  { label: 'Pro', value: 'pro', description: 'For teams' },
  { label: 'Enterprise', value: 'enterprise', description: 'For large orgs' },
]
</script>
<template>
  <DsRadioGroup v-model="plan" :options="options" />
</template>
Card mode
Horizontal

Skeleton

Use DsRadioGroupSkeleton as a loading placeholder while content is being fetched.

Default
vue
<DsRadioGroupSkeleton :count="3" />
Card mode
vue
<DsRadioGroupSkeleton
  :count="3"
  card
/>

Accessibility

  • Uses role="radiogroup" and native radio inputs (visually hidden).
  • Keyboard navigable with arrow keys.