JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1023
  • Score
    100M100P100Q106500F
  • License ISC

React Native in-app native-like notifications.

Package Exports

  • react-native-in-app-message

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-in-app-message) 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 in-app platform-specific notifications.

  • The package uses react-native-blur and gesture-handler to implement native-like appearance
  • Compatible with iPhone X, XR, XS, XS Max.
  • Allows you to use your own components.

Installation

  • Run npm install react-native-in-app-message
  • Run npm install react-native-gesture-handler and follow the linking guide. Required for both platforms
  • Run npm install react-native-blur and follow the linking guide. Required for iOS

Usage

import {Notification} from "react-native-in-app-message";

...

render() {
    return (
      <Fragment>
        <AppNavigator screenProps={{showNotification: () => this.notificaftion.show()}} />
        <Notification 
            text={'Hello world'}
            onPress={() => this.notificaftion.hide()} 
            ref={node => this.notification = node} 
            textColor={'#000'} />
      </Fragment>
    )
  }

Methods

  • show()
  • hide()

Props

  • blurType - must be one of 'xlight' | 'light' | 'dark'. iOS Only
  • blurAmount - number. iOS Only
  • duration - number. Message duration
  • autohide - boolean.
  • text - string. The text for the message. Required if customComponent is not used.
  • textColor - string.
  • customComponent - ReactNode.
  • onPress - Function