1.0.3 • Published 4 years ago

react-native-slider-smile v1.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

react-native-slider-smile

Top = falseTop = true
SliderBoxSliderBox

Custom Slider Smile

This component is based on the slider (this slider), it was just customized

PropsValue TypeDescriptionDefault
valuenumbervalue from sets Slider controller5
onValueChangefunctionfunction that monitors the change in value()=>{}
toplayoutput smiles above the barfalse
showInTextarrayset a text from number selected[]
showNumberboolshow value in pin slidertrue

Install

npm i react-native-slider-smile

Usage :

1- add below import in your code :

import { SliderSmile } from "react-native-slider-smile";

2- Define the props according to the documentation above or copy the example below.

<SliderSmile
    top={true}
    value={valor}                                                                
    onValueChange={v => setValor(Math.trunc(v))}
    showInText={{
        1: 'Very Bad',
        2: 'Bad',
        3: 'Not so bad',
        4: 'Ok',
        5: 'Medium',
        6: 'Cool',
        7: 'Good',
        8: 'Very good',
        9: 'Fantastic',
        10: 'Excellent'
    }}
/>