rns

react-native-snackbar-js

A simple snackbar component for react-native using pure js

Showing:

Popularity

Downloads/wk

10

Maintenance

No Maintenance Data Available

Package

Dependencies

1

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Deprecated!
this package has been deprecated

Readme

react-native-snackbar-js

npm version

Alt Text

A simple snackbar component for react-native using pure js.

Usage

A default snackbar without action button.

<SnackBar visible={true} text="Welcome!" />

Advanced snackbar usage with actions.

<SnackBar
  visible={this.state.showSnackBar}
  text="Item has been deleted"
  onPress={() => this.setState({ showSnackBar: false })}
  onAction={() => this.undoDelete()}
  actionText="Undo"
/>

Styles

For customizing styles, please see backgroundColor, textColor, and actionTextColor props.

Props

  • visible: (required) handles component visibility
  • text: (required) text to display to the component
  • backgroundColor: (optional) change background color
  • textColor: (optional) change text color
  • onPress: (optional) callback to execute when component is pressed
  • onAction: (optional) execute when action text is pressed
  • actionText: (optional) a clickable text for
  • actionTextColor: (optional) change color for action text

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100