# react-smartbanner

> Smart app banner react version.

Latest version **5.1.4** (published 2019-09-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-smartbanner
pnpm add react-smartbanner
yarn add react-smartbanner
bun add react-smartbanner
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.1.4 |
| Published | 2019-09-25 |
| First published | 2015-09-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/react-smartbanner) |
| Module format | CommonJS |
| Node | >=6.2.2 |
| Dependencies | 4 |
| Unpacked size | 726.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 76 |
| Author | patw |
| Maintainers | patw |
| Keywords | react, component, smartbanner, ios, iphone, android, windowsphone, smart, banner |

## Links

- npm: https://www.npmjs.com/package/react-smartbanner
- Repository: https://github.com/patw0929/react-smartbanner
- Homepage: https://github.com/patw0929/react-smartbanner#readme
- Issues: https://github.com/patw0929/react-smartbanner/issues
- npm.io page: https://npm.io/package/react-smartbanner

## Dependencies (4)

- [cookies-js](https://npm.io/package/cookies-js.md) ^1.2.1
- [prop-types](https://npm.io/package/prop-types.md) ^15.5.8
- [ua-parser-js](https://npm.io/package/ua-parser-js.md) ^0.7.9
- [cookie-cutter](https://npm.io/package/cookie-cutter.md) ^0.1.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 5.1.4 (latest) — 2019-09-25
- 5.1.3 — 2019-01-04
- 5.1.3-alpha.0 — 2019-01-02
- 5.1.2 — 2018-12-19
- 5.1.1 — 2018-11-07
- 5.1.0 — 2018-10-16
- 5.0.6 — 2018-05-02
- 5.0.5 — 2018-02-15
- 5.0.4 — 2018-02-09
- 5.0.1 — 2017-12-12
- 5.0.0 — 2017-12-12
- 4.0.0 — 2017-10-07
- 3.2.1 — 2017-09-28
- 3.2.0 — 2017-08-31
- 3.1.0 — 2017-08-22
- … 13 more at https://npm.io/package/react-smartbanner/versions

## README

# React-SmartBanner

[![Build Status](https://travis-ci.org/patw0929/react-smartbanner.svg)](https://travis-ci.org/patw0929/react-smartbanner)
[![npm version](https://badge.fury.io/js/react-smartbanner.svg)](http://badge.fury.io/js/react-smartbanner)
[![Coverage Status](https://coveralls.io/repos/github/patw0929/react-smartbanner/badge.svg?branch=master)](https://coveralls.io/github/patw0929/react-smartbanner?branch=master)
[![npm](https://img.shields.io/npm/l/express.svg?maxAge=2592000)]()

Rewrite [Smart App Banner](https://github.com/kudago/smart-app-banner) in React.js.


## Demo & Examples

Live demo: [patw0929.github.io/react-smartbanner](https://patw0929.github.io/react-smartbanner/)

To build the examples locally, run:

```bash
npm install
npm start
```

or

```bash
yarn
yarn start
```

## Installation

The easiest way to use react-smartbanner is to install it from NPM and include it in your own React build process (using [Webpack](http://webpack.github.io/), etc).

You can also use the standalone build by including `dist/main.js` in your page. If you use this, make sure you have already included React, and it is available as a global variable.

```
npm install react-smartbanner --save
```

or

```bash
yarn add react-smartbanner
```

## Compatibility

| react-smartbanner version | React version |
| --- | --- |
| `4.x.x+` | `^16.0.0` |
| `3.x.x`  | `^15.0.0` |


## Usage

Remember to add following meta tags in your HTML page: (Use Facebook app as example)

```html
<head>
  <meta name="apple-itunes-app" content="app-id=284882215">
  <meta name="google-play-app" content="app-id=com.facebook.katana">
  <meta name="msApplication-ID" content="82a23635-5bd9-df11-a844-00237de2db9e">
  <meta name="msApplication-PackageFamilyName" content="facebook_9wzdncrfhv5g">
  <link rel="apple-touch-icon" href="icon.png">
  <link rel="android-touch-icon" href="icon.png">
  <link rel="windows-touch-icon" href="icon.png">
</head>
```

And React-SmartBanner component usage:

```javascript
import React from 'react';
import ReactDOM from 'react-dom';
import SmartBanner from 'react-smartbanner';
import 'react-smartbanner/dist/main.css';

ReactDOM.render(<SmartBanner title={'Facebook'} />, document.getElementById('content'));
```

### Properties

Please see the [Demo Page](https://patw0929.github.io/react-smartbanner/)


## Development (`src` and the build process)

**NOTE:** The source code for the component is in `src`. A UMD bundle is also built to `dist`, which can be included without the need for any build system.

To build, watch and serve the examples (which will also watch the component source), run `npm start`.

If you want to build to the bundle file to `dist/` folder, please run:

```bash
npm run build
```

or

```bash
yarn run build
```

## Contributing

To contribute to react-smartbanner, clone this repo locally and commit your code on a separate branch. Please write tests for your code, and run the linter before opening a pull-request:

```bash
npm test
npm run lint
```

or

```bash
yarn test
yarn run lint
```

## Based on

[Smart App Banner](https://github.com/kudago/smart-app-banner)

## License

MIT

Copyright (c) 2015-2019 patw.

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