Skip to content

Radio ​

Drawn with view on the Mini Program

The native radio component is not used (MP styles are not controllable); instead the dot is drawn with view.

Basic usage ​

vue
<template>
  <lh-radio-group v-model="value">
    <lh-radio value="a" label="Option one" />
    <lh-radio value="b" label="Option two" />
    <lh-radio value="c" label="Option three" disabled />
  </lh-radio-group>
</template>

<script setup lang="ts">
import { ref } from 'vue'
const value = ref('a')
</script>

Radio Props ​

PropDescriptionTypeDefault
modelValue (v-model)Whether it is checkedunknown—
valueThe value of this itemunknown—
labelTextstring—
disabledDisabledbooleanfalse
nameNative namestring—
sizeSize'small' | 'medium' | 'large'—
customClassCustom class namestring—
sxQuick layout propsLhSxProps—

RadioGroup Props ​

PropDescriptionTypeDefault
modelValue (v-model)Checked valueunknown—
disabledDisable all childrenbooleanfalse
nameNative namestring—
sizeSize (passed down to the children)'small' | 'medium' | 'large'—

Events ​

EventDescriptionCallback parameters
update:modelValueValue changed(value)
changeValue changed(value)