1.6.4 • Published 2 years ago

advanced-react-circular-slider v1.6.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

advanced-react-circular-slider

npm.io npm.io

This is a fork of the original react-circular-slider. A highly customizable circular slider with no dependencies. See some live demos here!

install

npm install advanced-react-circular-slider

example

import React from 'react';
import CircularSlider from 'advanced-react-circular-slider';
import 'advanced-react-circular-slider/main.css';

const App = () => {
    return (
      <CircularSlider
        labelTop="Spoons"
        labelBottom="TBSP"
        width={300}
        min={0}
        max={4}
        step={0.1}
        labelStep={0.5}
        onChange={console.log}
      ></CircularSlider>
    )
};

export default App;

Props

proptypedefaultAffects
widthnumber280width of the slider
directionnumber1clockwise (1) or anticlockwise (-1)
minnumber0smallest value
maxnumber360largest value
stepnumber0.1step count
labelStepnumber1step count of the labels
limitnumber360maximum angle
offsetAnglenumber0offset angle
dataarray[]array of data to be spread in 360°
dataIndexnumber0initially place knob at a certain value in the array
knobElstringnullknob element
knobColorstring#0076BAknob color
knobSizenumber60knob size, should be large than track size
hideKnobbooleanfalsehide knob
knobDraggablebooleantrueknob not draggable
knobPositionstringtopknob's 0 position to be top, right, bottom or left
labelTopstringDemolabel on the top
labelBottomstring''label on the bootom
labelColorstring#2597D7label and value color
secondaryLabelColorstring#c0c0c0secondary label and value color
labelOffsetnumber20spacing between label and circle
roundLabelFontSizenumber1.2remfont size of the label on the circle
roundLabelColorstring#272b77color of the label on the circle
activedlabelColorstring#0076baactived label and value color
labelFontSizestring1.5remlabel font-size
valueFontSizestring4remlabel value font-size
appendToValuestring''append character to value
prependToValuestring''prepend character to value
renderLabelValuejsxnulladd custom jsx code for the labels and styles
verticalOffsetstring2remvertical offset of the label and value
hideLabelValuebooleanfalsehide label and value
progressColorFromstring#54BFFDprogress track gradient start color
progressColorTostring#0378BCprogress track gradient end color
progressSizenumber16progress track size
progressLineCapstringroundprogress track cap to be round or flat
trackColorstring#CFE0F4background track color
trackSizenumber20background track size
doubleLineTypestringprogresstype of double line progress or track
doubleLineColorstringnulldouble line color mode gradiant or null or color string
onChangefuncvalue => {}returns label value
magentTolerancenumber10stength of the slider magnet to the marks

license

MIT License

1.6.4

2 years ago

1.5.5

2 years ago

1.6.3

2 years ago

1.5.4

2 years ago

1.6.2

2 years ago

1.5.3

2 years ago

1.6.1

2 years ago

1.5.2

2 years ago

1.6.0

2 years ago

1.5.1

2 years ago

1.5.9

2 years ago

1.5.8

2 years ago

1.5.7

2 years ago

1.5.6

2 years ago

1.5.0

3 years ago