Socket
Socket
Sign inDemoInstall

rn-swipeout

Package Overview
Dependencies
514
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rn-swipeout

iOS-style swipeout buttons behind component


Version published
Weekly downloads
3
decreased by-40%
Maintainers
1
Install size
25.0 kB
Created
Weekly downloads
 

Readme

Source

react-native-swipeout

iOS-style swipeout buttons that appear from behind a component

swipeout preview

To do for v3.0.0 (issues)

Done

  • Android compatibility (#43)
  • Implement Animated library
    • Remove react-tween-state dependency (#49, #73)
  • Add ability to pass props to swipeout parent
    • Including style
  • Add ability to pass props to buttons
    • Including onPress, style, underlayColor
  • Add ability to pass props to buttons
  • Add onClose prop (#32)
  • Update button type prop
  • Add ability to set custom button widths (#42)
  • Reimplement scroll prop (considering Animated library)
  • Reimplement close(now open) prop (#54)

Needs Outside Verification

  • iPhone 6s compatibility (#44)

Not Done

  • Test on Android (#60, #78)
  • Verify performance improvements (#40, #41)
  • Add overswipe button prop (#10)
  • Compensate for device rotation (#7)
  • Rewrite Readme
    • Update preview gif (#21)
  • Update wiki

Installation

npm install --save react-native-swipeout

Usage example

See index.ios.js for a more detailed example. See the Wiki usage tips.

var Swipeout = require('react-native-swipeout')

// Buttons
var swipeoutBtns = [
  {
    text: 'Button'
  }
]

// Swipeout component
<Swipeout right={swipeoutBtns}>
  <View>
    <Text>Swipe me left</Text>
  </View>
</Swipeout>

Props

All props are optional.

PropTypeDefaultDescription
autoCloseboolfalseauto close on button press
openstring/bool"left", "right", or false
leftarray[]swipeout buttons on left
onClosefuncfunction when buttons are hidden
onOpenfuncfunction when buttons are exposed
propsobjectnullpass props to swipeout (ex: style)
rightarray[]swipeout buttons on right
scrollfuncprevent parent scroll
Button props
PropTypeDefaultDescription
componentstringnullpass custom component to button
propsobjectnullpass props to button (ex: onPress, style, underlayColor)
textstring'Click Me'text
typestringnulldanger/delete, primary, secondary, success

Keywords

FAQs

Last updated on 09 Nov 2016

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