0.2.0 • Published 9 months ago

react-native-cone-slider v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

react-native-cone-slider

Cone shape slider in react-native

Installation

yarn add react-native-cone-slider

or

npm install react-native-cone-slider

Usage

import { ConeSlider } from 'react-native-cone-slider';

// ...

<ConeSlider
    height={100} // issue: adjust height and width untill you get the desired Cone Slider
    width={200}
    min={0}
    max={100}
    onValueChange={(value: number) => {
        console.log(`🚀 ~ file: README.md:30 ~ value:`, value);
    }}
    containerStyle={{ backgroundColor: '#fff' }}
/>

Props

Namedescriptiontyperequired
heightHeight of slidernumberYes
widthWidth of slidernumberYes
minMinimum value of slidernumberYes
maximumMaximum value of slidernumberYes
onValueChangeFunction to get the values from slider(value:number)=>voidNo
rotationDegreeRotate the Cone SlidernumberNo
containerStyleStyle Object, Applied to Slider ContainerStyleProp\<ViewStyle>No
sliderBackgroundColorStyle Object, Applied to Slider ContainerstringNo
circleBackgroundColorStyle Object, Applied to Slider ContainerstringNo

⚠️ Issues

Right now, you need to adjust height and widht to get the expected behaviour from Cone Slider.

Generally, the width will be doubled the value of height, ( this is not exactly right, specially for smaller height)

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

0.2.0

9 months ago

0.1.2

9 months ago

0.1.1

9 months ago