Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-simple-range-slider

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-simple-range-slider

Change Your numeric value or numeric range value with dragging handles

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
934
decreased by-21.05%
Maintainers
1
Weekly downloads
 
Created
Source

vue-simple-range-slider

Change your numeric value or numeric range value with dragging handles

Demo

Features

  • Single value and range slider support
  • Vue3 and Vue2 supports
  • Exponential and linear scale support
  • Keyboard support
  • rtl support

Requires Vue >=3.2.0 or >=2.7.0

Getting Started

npm install vue-simple-range-slider

Or

yarn add vue-simple-range-slider

Example (Vue 3)

<template>
  <div>
    <VueSimpleRangeSlider
      style="width: 300px"
      :min="0"
      :max="1000000"
      exponential
      v-model="state.range"
    >
      <template #prefix="{ value }">$</template>
    </VueSimpleRangeSlider>
      
    <VueSimpleRangeSlider
      style="width: 300px"
      :min="0"
      :max="20"
      v-model="state.number"
    />
      
  </div>
</template>
<script>
import VueSimpleRangeSlider from "vue-simple-range-slider";
import "vue-simple-range-slider/css";
import { reactive, defineComponent } from "vue";
export default defineComponent({
  // register the component
  components: { VueSimpleRangeSlider },
  setup() {
    const state = reactive({ range: [20, 1000], number: 10 });
    return { state };
  },
});
</script>

Vue 2

For Vue 2 import the component like this:

import VueSimpleRangeSlider from "vue-simple-range-slider/vue2";
import "vue-simple-range-slider/vue2/css";

Props

NameTypeDefault
value (vue2)number Or [number,number]
model-value (vue3)number Or [number,number]
minnumber0
maxnumber100
exponentialbooleanfalse
bar-colorstring#bebebe
active-bar-colorstring#6699ff
keep-just-significant-figuresbooleantrue
significant-figuresnumber2
popover-content-editablebooleantrue

Events

NameType
input (vue2)(number) => void Or ([number,number]) => void
update:model-value (vue3)(number) => void Or ([number,number]) => void

Slots

NameType
prefix{value: number}
suffix{value: number}
splittervoid

Keywords

FAQs

Package last updated on 03 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc