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

made-vue-range-selector

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

made-vue-range-selector

  • 0.1.0-alpha.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25
increased by525%
Maintainers
1
Weekly downloads
 
Created
Source
MADE Vue project banner

MADE Vue - Range Selector

License - MIT Build - GitHub Actions Source - npmjs npm

A Vue 3 range selector component, a double slider that allows the user to select a value range between a minimum and maximum value.

Usage

To customise the range selector, you'll want to import the scss styling:

import "made-vue-range-selector/styles.scss";

In your main file, you can import the component:

import { createApp } from "vue";
import App from "./App.vue";

import RangeSelector from "made-vue-range-selector";

const app = createApp(App);
...
app.use(RangeSelector);
...
app.mount("#app");

You can then reference the range selector component in your app:

<template>
  <div>
    <m-range-selector
      v-model="rangeValue"
      :min="rangeMin"
      :max="rangeMax"
      :step="rangeStep"
      :showValues="rangeShowValues"
      :formatValue="formatRangeValue"
    />
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "MyPage",
  data() {
    return {
      rangeValue: [0, 100],
      rangeMin: 0,
      rangeMax: 100,
      rangeStep: 1,
      rangeShowValues: true,
      formatRangeValue: (v: number) => {
        return `${v}%`;
      },
    };
  },
  watch: {
    rangeValue(value) {
      console.log(value);
    },
  },
});
</script>

Keywords

FAQs

Package last updated on 17 Nov 2021

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