Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rn-slide-button-updated

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-slide-button-updated

A simple slide button using Reanimated 2 animation library.

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
120
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

React Native Slide Button

A simple slide button using Reanimated 2 animation library.

Preview

@

Installation

npm install --save rn-slide-button

or

yarn add rn-slide-button

Dependencies

yarn add react-native-gesture-handler react-native-reanimated

Usage

import SlideButton from 'rn-slide-button';

// ...
<SlideButton title="Slide To Unlock"/>;
// ...

Component props

proptypedefaultdescription
widthnumberscreen widthbutton width.
heightnumber60button height.
borderRadiusnumber30button corner radius.
completeThresholdnumber70determinates whether the thumb will reach to the end or to start. (value should be 0-100)
paddingnumber5button content padding.
disabledbooleanfalsechanges button touchability.
reverseSlideEnabledbooleantrueenable/disable thumb's back sliding feature
titlestringSlide to savebutton title.
titleStyleobjectobjectbutton title styling.
titleContainerStyleobjectobjectbutton title container styling.
iconImage/ Elementnullthumb icon.
thumbStyleobjectobjectthumb container styling.
containerStyleobjectobjectbutton container styling.
underlayStyleobjectobjectthumb underlay view styling.
autoResetbooleanfalsethumb will reset its position if it's set to true
autoResetDelaynumber1080msdelay time to reset
animationbooleanfalsethum will animate if it's set to true
animationDurationnumber180msanimation duration time
onSlideStartfunc() => {}it will be invoked when sliding starts
onSlideEndfunc() => {}it will be invoked when sliding ends
onReachedToStartfunc() => {}it will be invoked when thumb reaches to start
onReachedToEndfunc() => {}it will be invoked when thumb reaches to end

License

MIT

Keywords

FAQs

Package last updated on 16 May 2024

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc