Skip to content

Radio

The ERadio allow users to choose one option from a set. Demo Here

Usage

The ERadio and ERadioGroup components are used together as below:

vue

<template>
  <ERadioGroup v-model="value">
    <ERadio>Radio 1</ERadio>
    <ERadio>Radio 2</ERadio>
    <ERadio>Radio 3</ERadio>
    <ERadio>Radio 4</ERadio>
  </ERadioGroup>
</template>

<script setup>
  const value = ref(0);
</script>

Props

For ERadioGroup component, the following props are available:

PropTypeDefaultNote
modelValue[String, Number]-Value of the selected radio button.
disabledBooleanfalseDisables the radio buttons.
labelString-Component's label
messageString-Adds a message below the element.
verticalBooleanfalseIt organizes your radios vertically.
rulesArray-Validation rules. For more info refer to [Form Validation.
nameString-HTML name attribute.
validateOnString"input"Triggers validation on @values: submit, input.
stateString-Validates the user-provided data against established criteria and performs display validation. States can be none if no validation is necessary, danger if the selected is valid, or success if it is acceptable.
sizeString"md"The ERadioGroup element has three predefined sizes: sm, md, lg.
alignString"start"Specifies how the pagination buttons are distributed along the cross axis in a container.
colorString"primary"The given color is applied to the element - utility colors are supported (e.g primary or danger). you'll find a list of built-in classes on the src/styles/_vars.scsspage.

For ERadio component, the following props are available:

PropTypeDefaultNote
idString-HTML id attribute.
disabledBooleanfalseDisables the ERadio.
sizeString"md"The ERadio element has three predefined sizes: sm, md, lg.
value[String, Number]falseYou can Add your own value. If not, we will default to the index of the child position.
colorString"primary"The given color is applied to the element - utility colors are supported (e.g primary or danger). you'll find a list of built-in classes on the src/styles/_vars.scsspage.
stateString-Validates the user-provided data against established criteria and performs display validation. States can be none if no validation is necessary, danger if the selected is valid, or success if it is acceptable.

Emits

The ERadioGroup component contains following emits.

EmitDescription
update:modelValueEmitted when the local ref's value is mutated.

COPYRIGHT