Radio
Display a radio field.
Usage
Use a v-model
to make the Radio reactive.
vue
<script setup>
import {ref} from 'vue'
const options = [{
value: 'email',
label: 'Email'
}, {
value: 'sms',
label: 'Phone (SMS)'
}, {
value: 'push',
label: 'Push notification'
}]
const selected = ref('sms')
</script>
<template>
<s-radio-group v-model="selected" legend="Choose something" :options="options" />
</template>
Label
Use the label
prop to display a label on the right.
vue
<template>
<s-radio label="Label" />
</template>