Socket
Book a DemoInstallSign in
Socket

react-native-full-slider

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

react-native-full-slider

Customizable range / single slider for react native apps

unpublished
latest
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

react-native-full-slider

Supports Android and iOS    MIT License

Customizable range slider for react native apps



Getting started

npm i react-native-full-slider



Usage

Examples - display


Examples - code (reflects the short video above)

import RangeSlider, { Slider } from 'react-native-full-slider';
     const [fromValue, setFromValue] = useState(0);
     const [toValue, setToValue] = useState(0);
     const [value, setValue] = useState(0);
     return (
          <View style={styles.container}>
               <View>
                    <RangeSlider min={5} max={25}
                         fromValueOnChange={value => setFromValue(value)}
                         toValueOnChange={value => setToValue(value)}
                         initialFromValue={11}
                    />
                    <Text>from value:  {fromValue}</Text>
                    <Text>to value:  {toValue}</Text>
               </View>
               <View>
                    <Slider min={0} max={40} step={4}
                         valueOnChange={value => setValue(value)}
                         initialValue={12}
                         knobColor='red'
                         valueLabelsBackgroundColor='black'
                         inRangeBarColor='purple'
                         outOfRangeBarColor='orange'
                    />
                    <Text>value:  {value}</Text>
               </View>
          </View>
     );

API - RangeSlider (default import)

PropertyTypeRequiredDefault
minnumberyes-
maxnumberyes-
fromValueOnChangecallbackyes-
toValueOnChangecallbackyes-
stepnumberno1
styleSizestring ( 'small' | 'medium' | 'large' | number )no'medium'
fromKnobColorstring (color)no'#00a2ff'
toKnobColorstring (color)no'#00a2ff'
inRangeBarColorstring (color)no'rgb(100,100,100)'
outOfRangeBarColorstring (color)no'rgb(200,200,200)'
valueLabelsBackgroundColorstring (color)no'#3a4766'
rangeLabelsTextColorstring (color)no'rgb(60,60,60)'
showRangeLabelsbooleannotrue
showValueLabelsbooleannotrue
initialFromValuenumbernoas 'min' value
initialToValuenumbernoas 'max' value
knobSizenumberno24/34/44
containerStylestyleno-
barHeightnumberno8/11/15
labelFormatter(value: number) => stringno-

API - Slider (1 knob)

PropertyTypeRequiredDefault
minnumberyes-
maxnumberyes-
valueOnChangecallbackyes-
stepnumberno1
styleSizestring ( 'small' | 'medium' | 'large' | number )no'medium'
knobColorstring (color)no'#00a2ff'
inRangeBarColorstring (color)no'rgb(200,200,200)'
outOfRangeBarColorstring (color)no'rgb(100,100,100)'
valueLabelsTextColorstring (color)no'white'
valueLabelsBackgroundColorstring (color)no'#3a4766'
rangeLabelsTextColorstring (color)no'rgb(60,60,60)'
showRangeLabelsbooleannotrue
showValueLabelsbooleannotrue
initialValuenumbernoas 'min' value
containerStylestyleno-
barHeightnumberno8/11/15
labelFormatter(value: number) => stringno-

API - Textual Slider

PropertyTypeRequiredDefault
values[ItemType]yes-
valueOnChangecallbackyes-
styleSizestring ( 'small' | 'medium' | 'large' | number )no'medium'
knobColorstring (color)no'#00a2ff'
inRangeBarColorstring (color)no'rgb(200,200,200)'
outOfRangeBarColorstring (color)no'rgb(100,100,100)'
valueLabelsTextColorstring (color)no'white'
valueLabelsBackgroundColorstring (color)no'#3a4766'
rangeLabelsTextColorstring (color)no'rgb(60,60,60)'
showRangeLabelsbooleannotrue
showValueLabelsbooleannotrue
initialValuenumberno-

Keywords

react-native

FAQs

Package last updated on 19 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts