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
| Prop | Type | Default | Description |
|---|---|---|---|
options * | RadioOption[] | — | The choices. |
label | string | "" | Group legend. |
disabled | boolean | false | Disables the whole group. |
name | string | — | Form field name; generated when omitted. |
modelValue | string | "" | Value of the picked option. |
Other HTML attributes (id, class, aria-*, data-*…) fall through to the component’s element and are type-checked.
Events
| Event | Payload | Description |
|---|---|---|
update:modelValue | [value: string] | v-model update. |