
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
react-native-snackbar-component
Advanced tools
A snackbar component for Android and iOS, customizable and simple.

See Google Material Design for more info on Snackbars.
npm install --save react-native-snackbar-component
import SnackBar from 'react-native-snackbar-component'
<SnackBar visible={true} textMessage="Hello There!" actionHandler={()=>{console.log("snackbar button clicked!")}} actionText="let's go"/>
| Prop | Type | Effect | Default Value |
|---|---|---|---|
| visible | boolean | Show or hide the snackbar | none |
| textMessage | string / function | The main message text, can also supply a function returning JSX to render custom message UI | none |
| actionHandler | function | Function to be called when button is pressed, if absent no action button is shown | none |
| actionText | message | The text of action button, will be uppercased automatically | none |
| backgroundColor | color | The background color of snackbar | #484848 |
| accentColor | color | The color of action button text | orange |
| messageColor | color | The color of main message text | #FFFFFF |
| distanceCallback | function | Function to be caled whenever snackbar moves in and out or changes layout, the function will be supplied a number indicating distance taken up by snackbar on bottom or top, based on position. | (distance) => {} |
| position | string | The position of the snackbar: top, bottom | bottom |
| top / bottom / left / right | number | Use these to position the snackbar | 0 |
| autoHidingTime | number | How many milliseconds the snackbar will be hidden | 0 (Do not hide automatically) |
| containerStyle | object | Override or add style to the root container View | {} |
| messageStyle | object | Override or add style to the message Text | {} |
| actionStyle | object | Override or add style to the action button Text | {} |
autoHidingTime to any particular value to hide the snackbar itself, although you will need to reset visible to false manually after the autoHidingTime period is over, since visible is controlled from outside.FAQs
A snackbar component for Android and iOS
The npm package react-native-snackbar-component receives a total of 529 weekly downloads. As such, react-native-snackbar-component popularity was classified as not popular.
We found that react-native-snackbar-component demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.