Radio
A component designed to simplify selection from multiple options. Ideal for forms and surveys, this component ensures a seamless user experience with its intuitive design and easy customization.
Usage
When dealing with more than 5 options please use the r-select component.
Head a group with r-field-label placed right before the first option, or before an r-flex whose first item is an option. The label then sits --r-space-3 from the option instead of the --r-space-2 it keeps above an input, because an option has no box edge to close the gap. The same applies to a checkbox group.
import { RRadio } from '@rebilly/revel';
<r-radio v-model="recurringInterval" value="monthly" />;
Examples
| Name | Type | Default | Description |
|---|---|---|---|
| label | string | '' | Label for radio input |
| id | string | () => nanoid() | Radio input id attribute. Defaults to nano ID |
| name | string | () => nanoid() | Radio input name attribute. Defaults to nano ID. |
| caption | string | '' | Caption to appear below the radio input |
| value | Value | Radio input value | |
| disabled | boolean | false | Disable radio input |
| validate | Nullable, ValidationState | null | Pass validation state to the radio input (Vuelidate) |
| modelValue | Nullable, Value | null | Radio input model value |
| Name | Description |
|---|---|
| label | Holds the radio label and can contain HTML. |
| Name | Description |
|---|---|
| update:modelValue |