Components
Radio Group
Displays a list of items where the user can only select one item at a time.
Free
Get a free plan today
$0
Basic
Get a basic plan today
$10
Premium
Get a premium plan today
$20
You selected:
Source Code
This component is composed of the following components:
Copy the following code into your project.
RadioGroup
<template>
<HRadioGroup
v-bind="$attrs"
:model-value="modelValue"
@update:model-value="$emit('update:modelValue', $event)"
>
<HRadioGroupLabel class="sr-only">{{ label }}</HRadioGroupLabel>
<slot />
</HRadioGroup>
</template>
<script setup lang="ts">
const props = defineProps<{
label?: string;
modelValue?: any;
}>();
</script>
RadioItem
<template>
<HRadioGroupOption v-slot="{ active, checked, disabled }" v-bind="$attrs">
<slot :active="active" :checked="checked" :disabled="disabled" />
</HRadioGroupOption>
</template>
Usage
Radio Inputs/Buttons
FreeGet a free plan today
BasicGet a basic plan today
PremiumGet a premium plan today
No plan selected yet.
Table of contents