RadioGroup API
API reference docs for the Stash RadioGroup
component. Learn about the props, CSS, and other APIs of this exported module.
Import
ts
import RadioGroup from '@leaflink/stash/RadioGroup.vue';
Props
Name | Type | Default | Description |
---|---|---|---|
addBottomSpace | boolean | - | Adds spacing under the field that is consistent whether hint/error text is displayed. |
disabled | boolean | false | Whether the entire group should be disabled |
errorText | string | undefined | Error text to display. Replaces `hintText` (if provided) & adds error styling. |
fullWidth | boolean | false | Whether the group should expand to the parent's width |
hintText | string | undefined | Displays text below the input; hidden when the isReadOnly prop is truthy. |
isReadOnly | boolean | - | Whether it's a readonly field. |
isRequired | boolean | - | Whether the field is required. |
label | string | undefined | Label to render above the input. |
modelValue | TSIndexedAccessType | undefined | The value of the selected radio option. Use this prop with the `update:modelValue` event to create a controlled component. |
name | string | undefined | Passed to the "name" attribute of the `<input>` elements within the RadioGroup. |
options | Array | undefined | Deprecated - Compose your radio group with the `Radio` component instead |
showOptionalInLabel | boolean | - | Show "(optional)" to the right of the label text |
variant | RadioGroupVariants | radio |
Slots
Name | Description |
---|---|
default |
Events
Name | Description |
---|---|
update:modelValue | Occurs when the user selects a radio option. Also, it enables v-model usage on the component. |