New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-swipe-slider

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-swipe-slider

iOS brightness-style slider ready to use in your next React Native app.

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

🎚️🤏 react-native-swipe-slider 📦

npm npm GitHub Workflow Status GitHub Workflow Status

iOS brightness-style slider ready to use in your next React Native app.

📥 Installation

npm install react-native-swipe-slider

or

yarn add react-native-swipe-slider

👀 Demo

React Native Swipe Slider demo

💈 Example

Please check out this Expo Snack.

🧰 Usage

import {useState} from 'react';
import SwipeSlider from 'react-native-swipe-slider';

const Component = () => {
    const [value, setValue] = useState(0);
    
    return (
        <SwipeSlider
            style={{flex: 1, width: 65}}
            min={0}
            max={100}
            value={value}
            onChange={value => setValue(value)}
            backgroundColor={'#1B1725'}
            barColor={'#226CE0'}
            vertical
        />
    );
}

Available props

  • min - The minimum permitted value.
  • max - The maximum permitted value.
  • step (optional) - The stepping interval.
  • value - Slider value.
  • onChange (optional) - Function which would be called when user stops touching the slider.
  • changeEventThrottle (optional) - This prop controls how ofter the change event will be fired while changing the value of the slider (as a time internal in ms). If it is not set onChange event would be fired only when user stops swiping the slider.
  • vertical (optional) - Slider orientation. Defaults to false.
  • backgroundColor - The slider background color (navy blue in the demo).
  • barColor - The bar color (blue in the demo).
  • style (optional) - Slider style.
  • barStyle (optional) - Bar style.
  • children (optional) - It could be used to place elements inside the slider (eg. an icon).

Keywords

react

FAQs

Package last updated on 24 Dec 2020

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