react-native-slider-smile

1.0.3 • Public • Published

react-native-slider-smile

Top = false Top = true
SliderBox SliderBox

Custom Slider Smile

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

Props Value Type Description Default
value number value from sets Slider controller 5
onValueChange function function that monitors the change in value ()=>{}
top layout put smiles above the bar false
showInText array set a text from number selected []
showNumber bool show value in pin slider true

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'
    }}
/>

/react-native-slider-smile/

    Package Sidebar

    Install

    npm i react-native-slider-smile

    Weekly Downloads

    1

    Version

    1.0.3

    License

    ISC

    Unpacked Size

    77.8 kB

    Total Files

    10

    Last publish

    Collaborators

    • alvesdiego18