Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
rn-slide-button-updated
Advanced tools
A simple slide button using Reanimated 2 animation library.
A simple slide button using Reanimated 2 animation library.
npm install --save rn-slide-button
or
yarn add rn-slide-button
yarn add react-native-gesture-handler react-native-reanimated
import SlideButton from 'rn-slide-button';
// ...
<SlideButton title="Slide To Unlock"/>;
// ...
prop | type | default | description |
---|---|---|---|
width | number | screen width | button width. |
height | number | 60 | button height. |
borderRadius | number | 30 | button corner radius. |
completeThreshold | number | 70 | determinates whether the thumb will reach to the end or to start. (value should be 0-100) |
padding | number | 5 | button content padding. |
disabled | boolean | false | changes button touchability. |
reverseSlideEnabled | boolean | true | enable/disable thumb's back sliding feature |
title | string | Slide to save | button title. |
titleStyle | object | object | button title styling. |
titleContainerStyle | object | object | button title container styling. |
icon | Image/ Element | null | thumb icon. |
thumbStyle | object | object | thumb container styling. |
containerStyle | object | object | button container styling. |
underlayStyle | object | object | thumb underlay view styling. |
autoReset | boolean | false | thumb will reset its position if it's set to true |
autoResetDelay | number | 1080ms | delay time to reset |
animation | boolean | false | thum will animate if it's set to true |
animationDuration | number | 180ms | animation duration time |
onSlideStart | func | () => {} | it will be invoked when sliding starts |
onSlideEnd | func | () => {} | it will be invoked when sliding ends |
onReachedToStart | func | () => {} | it will be invoked when thumb reaches to start |
onReachedToEnd | func | () => {} | it will be invoked when thumb reaches to end |
MIT
FAQs
A simple slide button using Reanimated 2 animation library.
The npm package rn-slide-button-updated receives a total of 25 weekly downloads. As such, rn-slide-button-updated popularity was classified as not popular.
We found that rn-slide-button-updated demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.