Socket
Socket
Sign inDemoInstall

react-native-vertical-slider-smartlife

Package Overview
Dependencies
514
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-vertical-slider-smartlife

A vertical Slider for React Native written entirely in javascript.


Version published
Maintainers
1
Install size
17.7 kB
Created

Readme

Source

A <VerticalSlider> component for react-native projects was initially cloned from rn-vertical-slider And been actively maintaining it as we wanted to avoid any future changes to original repo that effects our existing applications.

🆕 React Native Vertical Slider

(react-native-vertical-slider-smartlife)
A vertical Slider for React Native written entirely in javascript. Support this project with a ★ on Github.

✨Features

  • 📝 Completely written in Typescript
  • 🔗 No Native linking required

Example1 Example2

🏁 Getting Started

  • To add this slider to your project :
npm install react-native-vertical-slider-smartlife

🎨 Usage

  • A basic example of slider
<VerticalSlider
          value={1}
          disabled={false}
          min={0}
          max={100}
          onChange={(value: number) => {
            console.log("CHANGE", value);
          }}
          onComplete={(value: number) => {
            console.log("COMPLETE", value);
          }}
          width={50}
          height={300}
          step={1}
          borderRadius={5}
          minimumTrackTintColor={"gray"}
          maximumTrackTintColor={"tomato"}
          showBallIndicator
          ballIndicatorColor={"gray"}
          ballIndicatorTextColor={"white"}
        />

🎛 Props

PropertyTypeDefaultDescription
valuenumber0Value of the slider.
disabledboolfalseEnable or disable slider.
minnumber0Minimum value for slider.
maxnumber0Maximum value for slider.
onChangefunctionnullCallback continuously called while the user is dragging the slider.
onCompletefunctionnullCallback called when the user finishes changing the value (e.g. when the slider is released).
widthnumber0Width of the slider.
heightnumber0Height of the slider.
borderRadiusnumber0The border radius of component.
maximumTrackTintColorstring'#eee'The top color.
minimumTrackTintColorstring'#fff'The bottom color.
showBallIndicatorboolfalseTo show or hide indicator.
stepnumber0This value describes number of steps to skip.
ballIndicatorColorstring'#fff'Background color for Indicator
ballIndicatorWidthnumber48Diameter of Indicator. [Height of Indicator : If renderIndicator present]
ballIndicatorHeightnumber48Diameter of Indicator. [Width of Indicator : If renderIndicator present]
ballIndicatorPositionnumber-50Horizontal position of Indicator with respect to current selected value.
ballIndicatorTextColorstring'#fff'Indicator text color.
animationDurationnumber0Animation Duration
showBackgroundShadowboolean0Display shadow on Indicator (If available) and Slider
shadowPropsobjectsee belowShadow Configuration for Slider
renderIndicatorboolean0Render a custom slider indicator
  • shadowProps

shadowProps define the shadow properties for slider (Indicator Component if shown) Default Props :

  {
      shadowOffsetWidth = 0,
      shadowOffsetHeight = 1,
      shadowOpacity = 0.22,
      shadowRadius = 2.22,
      elevation = 3,
      shadowColor = '#000',
 }
  • renderIndicator

renderIndicator is used when you want to use custom indicator for the slider. ballIndicatorHeight, ballIndicatorWidth will define the height and width of the component.

  • Custom renderIndicator

    Custom Indicator

📌 Extras

  • Gradient Slider Slider with linear gradient
  • Github ★'s are more additcting than Coffee 🤩

☀️ License

This project is licensed under the MIT License - see the LICENSE.md file for details

🚧 Contributing

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

License

MIT

credits

sacmii

Keywords

FAQs

Last updated on 21 Sep 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc