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

vue3-histogram-slider

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-histogram-slider

Range slider with histogram for Vue 3

  • 0.4.16
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
333
decreased by-25.34%
Maintainers
1
Weekly downloads
 
Created
Source

Range slider with histogram for Vue 3

npm GitHub issues npm


🚀 Quick Start

If you are a try and learn developer, you can start trying the vue3-histogram-slider now using codesandbox.io.

Edit Vue Histogram Slider

📦 Installation

yarn

yarn add vue3-histogram-slider

npm

npm i vue3-histogram-slider

🔧 Usage

import HistogramSlider from "vue3-histogram-slider";
import "vue3-histogram-slider/dist/histogram-slider.css";
...
app.component(HistogramSlider.name, HistogramSlider);
<HistogramSlider
    :width="600"
    :bar-height="100"
    :data="data"
/>

📋 Props

PropertyTypeDefaultDescription
minnumber1Set slider minimum value
maxnumber100Set slider maximum value
dataarray-Data for histogram
blockbooleanfalseLocks slider and makes it inactive
gridbooleantrueEnables grid of values.
gridNumnumber4Number of grid units.
stepnumber1Set sliders step. Always > 0. Could be fractional.
hideMinMaxbooleantrueHides min and max labels
hideFromTobooleanfalseHides from and to labels
toFixedbooleanfalseFix position of right handle.
fromFixedbooleanfalseFix position of left (or single) handle.
forceEdgesbooleanfalseSlider will be always inside it's container.
dragIntervalbooleanfalseAllow user to drag whole range. Only in double type
keyboardbooleantrueActivates keyboard controls. Move left: ←, ↓, A, S. Move right: →, ↑, W, D.
typestringdoubleChoose slider type, could be single - for one handle, or double for two handles
widthnumber or string600width of histogram
barHeightnumber100Set max histogram bar height
barWidthnumber6Set histogram bar width
barGapnumber5Set histogram bar gap
barRadiusnumber4Set histogram bar radius
prettifyfunctionnullSet up your own prettify function. Can be anything. For example, you can set up unix time as slider values and than transform them to cool looking dates.
lineHeightnumber6Set slider line height
transitionDurationnumber100Set duration to histogram bars
primaryColorstring#0091ffPrimary color
labelColorstring#0091ffLabel color
holderColorstring#dee4ecHolder color
handleColorstring#ffffffSlider handle color
gridTextColorstringsilverPrimary color
fontFamilystring'Arial, sans-serif'Set text font family
fontSizenumber12Set text font size
handleSizenumber26Slider handle size
histSliderGapnumber6Set gap between slider and histogram
updateColorOnChangebooleantrueUpdate histogram bar color on change (recommended false for performance)
clipbooleantrueAllow dragging a selection to clip graph range
resettablebooleanfalseAllow zoom reset to a button passed in a slot (with default slot available)

🔧 Event

NameDescription
startTriggers when slider start.
changeTriggers when each values change.
updateTriggers when slider is modified by external methods update or reset.
finishTriggers when user releases handle.

Keywords

FAQs

Package last updated on 24 Jul 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