Skip to content

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

NameTypeDefaultDescription
addBottomSpaceboolean-Adds spacing under the field that is consistent whether hint/error text is displayed.
disabledbooleanfalseWhether the entire group should be disabled
errorTextstringundefinedError text to display. Replaces `hintText` (if provided) & adds error styling.
fullWidthbooleanfalseWhether the group should expand to the parent's width
hintTextstringundefinedDisplays text below the input; hidden when the isReadOnly prop is truthy.
isReadOnlyboolean-Whether it's a readonly field.
isRequiredboolean-Whether the field is required.
labelstringundefinedLabel to render above the input.
modelValueTSIndexedAccessTypeundefinedThe value of the selected radio option. Use this prop with the `update:modelValue` event to create a controlled component.
namestringundefinedPassed to the "name" attribute of the `<input>` elements within the RadioGroup.
optionsArrayundefinedDeprecated - Compose your radio group with the `Radio` component instead
showOptionalInLabelboolean-Show "(optional)" to the right of the label text
variantRadioGroupVariantsradio

Slots

NameDescription
default

Events

NameDescription
update:modelValueOccurs when the user selects a radio option. Also, it enables v-model usage on the component.