Skip to content

Slider ​

Diapazon, belgilar, tultip, gradient to‘ldirish, moslashtirilgan thumb va boshqalarga ega tortiladigan slayder.

30
vue
<template>
  <VxSlider v-model="value" />
</template>

Range ​

20 – 70
vue
<template>
  <VxSlider v-model="value" range />
</template>

Step with Stops ​

50
vue
<template>
  <VxSlider :step="10" show-stops />
</template>

With Input ​

vue
<template>
  <VxSlider show-input />
</template>

Input with Prefix / Suffix ​

$
%
vue
<template>
  <VxSlider show-input prefix="$" />
  <VxSlider show-input suffix="%" />
</template>

Range with Input ​

–
vue
<template>
  <VxSlider range show-input />
</template>

Show Min / Max Labels ​

0
100
vue
<template>
  <VxSlider show-min-max />
</template>

Show Value Below Thumb ​

60%
vue
<template>
  <VxSlider show-value suffix="%" />
</template>

Tooltip Always + Format ​

60%
vue
<template>
  <VxSlider tooltip-always :format-tooltip="v => v + '%'" />
</template>

Custom Color ​

vue
<template>
  <VxSlider color="#22c55e" />
</template>

Custom Track Color ​

vue
<template>
  <VxSlider color="#3b82f6" track-color="#1e3a5f" />
</template>

Gradient Fill ​

vue
<template>
  <VxSlider :gradient="['#3b82f6', '#8b5cf6', '#ec4899']" />
</template>

Thumb Shapes ​

circle
square
diamond
vue
<template>
  <VxSlider thumb-shape="circle" />
  <VxSlider thumb-shape="square" />
  <VxSlider thumb-shape="diamond" />
</template>

Custom Thumb Slot ​

50
50
vue
<template>
  <VxSlider v-model="value">
    <template #thumb="{ value, dragging }">
      <div class="my-thumb">{{ value }}</div>
    </template>
  </VxSlider>
</template>

Marks ​

0°
1°
Cold
Warm
Hot
vue
<template>
  <VxSlider :marks="{ 0: '0°', 0.5: 'Warm', 1: '1°' }" />
</template>

Snap to Marks ​

Faqat belgi pozitsiyalaridagi qiymatlarga ruxsat beradi.

0
100%
25%
50%
75%
0.5
vue
<template>
  <VxSlider snap-to-marks :marks="{ 0: '0%', 50: '50%', 100: '100%' }" />
</template>

Reversed ​

100
0
30
vue
<template>
  <VxSlider reversed />
</template>

Precision ​

vue
<template>
  <VxSlider :min="0" :max="1" :step="0.01" :precision="2" />
</template>

Sizes ​

sm
default
lg
vue
<template>
  <VxSlider size="sm" />
  <VxSlider />
  <VxSlider size="lg" />
</template>

Vertical ​

50
vue
<template>
  <VxSlider vertical height="200px" />
</template>

Readonly ​

65%
vue
<template>
  <VxSlider :model-value="65" readonly />
</template>

Disabled ​

vue
<template>
  <VxSlider disabled />
</template>

Props ​

PropTypeDefaultDescription
modelValuenumber | [number, number]0Qiymat (v-model)
minnumber0Minimal
maxnumber100Maksimal
stepnumber1Qadam
disabledbooleanfalseO‘chirish
readonlybooleanfalseFaqat o‘qish
rangebooleanfalseDiapazon rejimi
showTooltipbooleantrueTultipni ko‘rsatish
tooltipAlwaysbooleanfalseTultipni doimo ko‘rsatish
showStopsbooleanfalseQadam nuqtalari
showInputbooleanfalseRaqam kiritish maydoni
showValuebooleanfalseThumb ostidagi qiymat
showMinMaxbooleanfalseMin/max yorliqlari
size'sm' | 'default' | 'lg''default'O‘lcham
colorstring''To‘ldirish/thumb rangi
trackColorstring''Nofaol yo‘l rangi
gradientstring[]—Gradient to‘ldirish ranglari
formatTooltip(v: number) => string—Tultip formatlovchi
marksRecord<number, string>—Nomli belgilar
snapToMarksbooleanfalseFaqat belgi qiymatlariga ruxsat
verticalbooleanfalseVertikal rejim
reversedbooleanfalseYo‘nalishni teskariga qilish
heightstring'200px'Vertikal balandlik
lazybooleanfalseChange hodisasini faqat qo‘yib yuborilganda chiqarish
debouncenumber0Yangilanishlarni debounce qilish (ms)
precisionnumber—O‘nli xonalar
thumbShape'circle' | 'square' | 'diamond''circle'Thumb shakli
prefixstring''Kiritish prefiks matni
suffixstring''Kiritish suffiks matni
labelstring''Qulay foydalanish uchun yorliq

Events ​

EventTypeDescription
update:modelValue(v)Qiymat o‘zgardi
change(newVal, oldVal)Qiymat o‘zgardi (eski qiymat bilan)

Slots ​

SlotPropsDescription
thumb{ value, dragging }Moslashtirilgan thumb kontenti