Vue NativeVue Native
Guide
Components
Composables
Navigation
  • iOS
  • Android
  • macOS
GitHub
Guide
Components
Composables
Navigation
  • iOS
  • Android
  • macOS
GitHub
  • Layout

    • VView
    • VScrollView
    • VSafeArea
    • VKeyboardAvoiding
  • Text & Input

    • VText
    • VInput
  • Interactive

    • VButton
    • VPressable
    • VSwitch
    • VSlider
    • VSegmentedControl
    • VCheckbox
    • VRadio
    • VDropdown
    • VRefreshControl
  • Media

    • VImage
    • VWebView
    • VVideo
  • Lists

    • VList
    • VFlatList
    • VSectionList
  • Feedback

    • VActivityIndicator
    • VProgressBar
    • VAlertDialog
    • VActionSheet
    • VModal
    • VErrorBoundary
  • Transition & State

    • VTransition & VTransitionGroup
    • KeepAlive
    • VSuspense
  • Navigation

    • VNavigationBar
    • VTabBar
  • System

    • VStatusBar
    • VPicker
  • macOS

    • VToolbar
    • VSplitView
    • VOutlineView

VSlider

A slider control for selecting a value from a continuous range. Maps to UISlider on iOS and SeekBar on Android. Supports v-model for two-way binding.

Usage

<VSlider v-model="volume" :min="0" :max="100" />

Props

PropTypeDefaultDescription
modelValuenumber0The current value (use with v-model)
minnumber0Minimum value
maxnumber1Maximum value
styleObject{}Layout styles
accessibilityLabelstring--A text label for assistive technologies
accessibilityRolestring--The accessibility role (e.g. 'adjustable')
accessibilityHintstring--Describes what happens when the user interacts with the element
accessibilityStateObject--Accessibility state object

Events

EventPayloadDescription
@update:modelValuenumberEmitted on value change (used by v-model)
@changenumberEmitted on value change with the new value

Example

<script setup>
import { ref } from 'vue'

const brightness = ref(0.5)
const volume = ref(0.8)
</script>

<template>
  <VView :style="styles.container">
    <VText :style="styles.label">Brightness: {{ Math.round(brightness * 100) }}%</VText>
    <VSlider v-model="brightness" :min="0" :max="1" :style="styles.slider" />

    <VText :style="styles.label">Volume: {{ Math.round(volume * 100) }}%</VText>
    <VSlider v-model="volume" :min="0" :max="1" :style="styles.slider" />
  </VView>
</template>

<script>
import { createStyleSheet } from '@thelacanians/vue-native-runtime'

const styles = createStyleSheet({
  container: {
    flex: 1,
    padding: 24,
  },
  label: {
    fontSize: 16,
    marginBottom: 8,
  },
  slider: {
    marginBottom: 24,
  },
})
</script>

Tips

The default range is 0 to 1. For integer ranges (e.g., 0--100), set :min="0" and :max="100".

Edit this page
Last Updated: 2/28/26, 11:24 PM
Contributors: Abdul Hamid, Claude Opus 4.6
Prev
VSwitch
Next
VSegmentedControl