Files
oa/documentation/plugins/slider/slider-format-documentation.md
2025-05-24 01:49:48 +09:00

916 B

state
state
value
54

Tooltip format

The <Slider /> component allows to pass a formatting function to its format property. You can return the tooltip value with the format that you want.

<script setup lang="ts">

const value = ref(54)
const format = (value) => {
  return `${value}%`
}
</script>

<template>
  <VField v-slot="{ id }" class="has-curved-tooltip">
    <VControl>
      <Slider
        :id="id"
        v-model="value"
        :format="format"
      />
    </VControl>
  </VField>
</template>