Skip to content

MRadio <m-radio> ​

A radio group. The picked dot springs in with a fan of wedges, two puffs and a hollow ポン. Native radios in a fieldset underneath: arrow keys, forms and screen readers work as usual.

Demo source
vue
<script setup lang="ts">
import { ref } from 'vue';
import { MRadio } from 'vue-manga-ui';

const plan = ref('free');
const plans = [
  { value: 'free', label: 'Free' },
  { value: 'pro', label: 'Pro' },
  { value: 'team', label: 'Team' },
];
</script>

<template>
  <MRadio v-model="plan" :options="plans" label="Plan" />
</template>

Props ​

PropTypeDefaultDescription
options *RadioOption[]—The choices.
labelstring""Group legend.
disabledbooleanfalseDisables the whole group.
namestring—Form field name; generated when omitted.
modelValuestring""Value of the picked option.

Other HTML attributes (id, class, aria-*, data-*…) fall through to the component’s element and are type-checked.

Events ​

EventPayloadDescription
update:modelValue[value: string]v-model update.