Radio
Terminal-style radio button with (o) / ( ).
Radio
Design lines
(o) A
vue
1<Tabs defaultValue="tuix">2 <TabsList>3 <Tab value="tuix">TUIX</Tab>4 <Tab value="rubik">Rubik</Tab>5 </TabsList>6 <TabPanel value="tuix">7 <Radio value="a" model-value="a" label="A" design="tuix" />8 </TabPanel>9 <TabPanel value="rubik">10 <Radio value="a" model-value="a" label="A" design="rubik" />11 </TabPanel>12</Tabs>Demo
Selection (modelValue / v-model + value)
Binds the selected radio to modelValue through v-model and value.
vue
1<Radio v-for="opt in options" :key="opt.value"2 v-model="selected" :value="opt.value" :label="opt.label" />Etiqueta (label)
Sets the visible text next to a radio with the label prop.
vue
1<script setup lang="ts">2import { ref } from 'vue'3import { Radio } from '@dowardev/herdrate-vue'45const labelSelected = ref('x')6</script>78<template>9 <Radio v-model="labelSelected" value="x" label="Extra option" />10</template>Color (color)
Each radio is its own group with the matching value pre-selected, so every indicator color shows and stays clickable.
vue
1<script setup lang="ts">2import { ref } from 'vue'3import { Radio } from '@dowardev/herdrate-vue'45const colorPrimary = ref('primary')6const colorSuccess = ref('success')7const colorWarning = ref('warning')8const colorDanger = ref('danger')9</script>1011<template>12 <Radio v-model="colorPrimary" value="primary" color="primary" label="Primary" />13 <Radio v-model="colorSuccess" value="success" color="success" label="Success" />14 <Radio v-model="colorWarning" value="warning" color="warning" label="Warning" />15 <Radio v-model="colorDanger" value="danger" color="danger" label="Danger" />16</template>Deshabilitado (disabled)
Renders a radio that cannot be selected with the disabled prop.
vue
1<Radio value="x" label="Not available" disabled />Props
modelValue
Currently selected value (string v-model across a radio group).
| Type | Default | Required |
|---|---|---|
string | '' | ❌ |
value
This radio's own value. The radio is checked when modelValue === value.
| Type | Default | Required |
|---|---|---|
string | — | ✅ |
label
Text shown next to the radio button.
| Type | Default | Required |
|---|---|---|
string | '' | ❌ |
color
Color of the (o) indicator when selected.
| Type | Default | Required |
|---|---|---|
'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark' | 'primary' | ❌ |
disabled
Disables interaction.
| Type | Default | Required |
|---|---|---|
boolean | false | ❌ |
design
Design line (or inherit from data-design).
| Type | Default | Required |
|---|---|---|
'tuix' | 'rubik' | — (inherits from data-design) | ❌ |
Events
| Event | Payload | Description |
|---|---|---|
update:modelValue | string | Emitted on selection |
CSS Custom Properties
| Token | Default | Description |
|---|---|---|
--font-mono | "JetBrains Mono", ui-monospace, monospace | Monospace font stack for code-like content (key labels, log lines, chips). |
--accent | from theme (--ctp-latte-mauve / --ctp-mocha-mauve) | Accent color, mapped from the active semantic color. |
--text | from theme (--ctp-latte-text / --ctp-mocha-text) | Primary text color used inside the component. |
--text-muted | from theme (--ctp-latte-subtext1 / --ctp-mocha-subtext1) | Secondary text for hints, annotations and disabled state. |
--color-primary | from theme (--ctp-latte-mauve / --ctp-mocha-mauve) | Primary semantic color (mauve in Catppuccin). |
--color-secondary | from theme (--ctp-latte-lavender / --ctp-mocha-lavender) | Secondary semantic color (lavender in Catppuccin). |
--color-tertiary | from theme (--ctp-latte-blue / --ctp-mocha-blue) | Tertiary semantic color (blue in Catppuccin). |
--color-success | from theme (--ctp-latte-green / --ctp-mocha-green) | Success semantic color (green in Catppuccin). |
--color-warning | from theme (--ctp-latte-yellow / --ctp-mocha-yellow) | Warning semantic color (yellow in Catppuccin). |
--color-danger | from theme (--ctp-latte-red / --ctp-mocha-red) | Danger semantic color (red in Catppuccin). |
--color-light | from theme (--ctp-latte-surface1 / --ctp-mocha-rosewater) | Light semantic color (lighter contrast tone). |
--color-medium | from theme (--ctp-latte-overlay0 / --ctp-mocha-overlay2) | Medium semantic color (mid-tone). |
--color-dark | from theme (--ctp-latte-text / --ctp-mocha-subtext1) | Dark semantic color (high contrast text). |
Ver Theming para la convención completa.