Skip to content

Slider 滑块

Form · Interactive component

Range value selection.

On-demand importwbbb-ui/components/slider

Basic Usage

Example code
<script setup lang="ts">
import { ref } from 'vue'
import { WbbbSlider } from 'wbbb-ui/components/slider'
import 'wbbb-ui/styles/slider'

const value = ref('')
</script>

<template>
  <WbbbSlider v-model="value" />
</template>
Live mobile previewOpen in a new tab ↗

States and Interaction

All listed states can be operated and verified in the live Playground preview.

DefaultFilledFocusDisabledError

API Reference

Props

PropertyDescriptionTypeDefaultRequired
activeColorSets the color used by the active state.string''No
disabledPrevents user interaction with the component.booleanfalseNo
maxSets the maximum allowed numeric value.number100No
minSets the minimum allowed numeric value.number0No
modelValueProvides the current value used by v-model.number0No
showValueControls whether the current value is displayed.booleanfalseNo
stepSets the increment used when changing a numeric value.number1No

Events

  • update:modelValue
  • change
  • changing

Slots

None

Two-way binding

Supports v-model (modelValue).

Platform Notes

Build verification: H5, App Vue, WeChat Mini Program, Alipay Mini Program, and Douyin Mini Program.

Runtime differences: H5 supports keyboard focus and reduced motion. Mini Programs provide equivalent touch interaction; verify upload, date selection, and overlays on target platforms.

Usage note: Use Playground to verify further state combinations and cross-platform behavior.

Wbbb UI · Built for uni-app product experiences