# react-native-cool-snackbar

> Snackbar component for react-native

Latest version **1.2.1** (published 2019-01-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-cool-snackbar
pnpm add react-native-cool-snackbar
yarn add react-native-cool-snackbar
bun add react-native-cool-snackbar
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2019-01-20 |
| First published | 2018-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 194.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Anshuman Bhardwaj |
| Maintainers | anshuman71 |
| Keywords | snackbar, reactjs, react-native |

## Links

- npm: https://www.npmjs.com/package/react-native-cool-snackbar
- Repository: https://github.com/Anshuman71/react-native-snackbar
- Homepage: https://github.com/Anshuman71/react-native-snackbar#readme
- Issues: https://github.com/Anshuman71/react-native-snackbar/issues
- npm.io page: https://npm.io/package/react-native-cool-snackbar

## Dependencies (3)

- [react](https://npm.io/package/react.md) 16.3.1
- [prop-types](https://npm.io/package/prop-types.md) ^15.6.2
- [react-native](https://npm.io/package/react-native.md) https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2019-01-20
- 1.2.0 — 2019-01-18
- 1.1.3 — 2018-12-25
- 1.1.2 — 2018-12-25
- 1.1.1 — 2018-12-24
- 1.1.0 — 2018-12-24
- 1.0.1 — 2018-12-18
- 1.0.0 — 2018-12-18

## README

# react-native-cool-snackbar

![picture](./ss.png)

### Snackbar component for React-native

## Props

| prop     | type                  | required and default      |
| -------- | --------------------- | ------------------------- |
| message  | string                | required (no default)     |
| isActive | bool                  | required (false)          |
| duration | oneOf('short','long') | not required (short)      |
| action   | object                | not required (no defalut) |

action object when provided should look like

| action  | type   | required |
| ------- | ------ | -------- |
| title   | string | yes      |
| color   | string | yes      |
| onPress | func   | yes      |

| duration        | timing |
| --------------- | ------ |
| short (default) | 2200ms |
| long            | 3500ms |

## Example

See this expo [snack](https://snack.expo.io/@anshuman71/cool-snackbar) to see how to use Snackbar

### In your render method

```
 <SnackBar
    message="Mail sent !"
    isActive={true}                             //conditionally set to true
    action={{                                   //optional
      title: 'RESEND',
      color: 'green',
      onPress: () => console.log('done'),
    }}
  />
```

---
_Source: https://npm.io/package/react-native-cool-snackbar · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
