JSPM

react-native-swipeable-overlay

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q21522F
  • License MIT

A swipeable overlay component for react native

Package Exports

  • react-native-swipeable-overlay

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-swipeable-overlay) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-native-swipeable-overlay

A swipeable overlay component for react native. A flexible swipeable overlay component for React native with callbacks and adjustable overlay opacity!

Demo

rn-halfcard Demo

Usage

<SwipeableOverlay
    ref={ ref => this.overlay = ref }
    onClose={ this.onClose }
    onShow={ () => console.log(‘shown’) }
    overlayOpacity={0.5}
>
    <View  style={{height: 400, width: 400, backgroundColor: 'pink' }}/>
</SwipeableOverlay>

Any valid React Native View can be passed as content of the SwipeableOverlay. The content is adjusted to the center of the viewport. To open the halfcard call this.overlay.show() method and to programatically close call this.overlay.hide() method. overlay is the reference to the overlay.

To show use something like <Text onPress={ () => { this.overlay.show() } }>Show</Text>

Installation

  • npm install --save react-native-swipeable-overlay

License

MIT