Skip to content

alvesdiego18/react-native-slider-smile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A simple custom slider

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published