Files
oa/documentation/switch-segment/switch-segment-label-documentation.md
2025-05-24 01:49:48 +09:00

795 B

state
state
value
true

Label

You might have to add a label to your switches in some cases. If so, use the VSwitchSegment component, which provides labelTrue and labelFalse attributes. See the code example for more details about usage.

<script setup lang="ts">
const value = ref(true)
</script>

<template>
  <VField horizontal>
    <VControl>
      <VSwitchSegment
        v-model="value"
        label-true="ON"
        label-false="OFF"
        color="primary"
      />
    </VControl>
  </VField>
</template>