# react-floating-whatsapp-button

> React component to add floating whatsapp chat button with window and an optional message to the app.

Latest version **1.1.0** (published 2021-10-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-floating-whatsapp-button
pnpm add react-floating-whatsapp-button
yarn add react-floating-whatsapp-button
bun add react-floating-whatsapp-button
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2021-10-30 |
| First published | 2021-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 127.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | arc9693 |
| Maintainers | rae450 |
| Keywords | react, typescript, whatsapp, floating, button |

## Links

- npm: https://www.npmjs.com/package/react-floating-whatsapp-button
- Repository: https://github.com/arc9693/react-floating-whatsapp-button
- Homepage: https://github.com/arc9693/react-floating-whatsapp-button#readme
- Issues: https://github.com/arc9693/react-floating-whatsapp-button/issues
- npm.io page: https://npm.io/package/react-floating-whatsapp-button

## 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

- 1.1.0 (latest) — 2021-10-30
- 1.0.3 — 2021-06-11
- 1.0.2 — 2021-06-11
- 1.0.1 — 2021-06-11
- 1.0.0 — 2021-06-11

## README

# react-floating-whatsapp-button

> React component to add floating whatsapp chat button with window and an optional message to the app.

[![NPM](https://img.shields.io/npm/v/react-floating-whatsapp-button.svg)](https://www.npmjs.com/package/react-floating-whatsapp-button) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

![Example gif](./example/public/example.gif)

## Install

```bash
npm install --save react-floating-whatsapp-button
```

## Usage

```tsx
import React, { Component } from 'react'

import { FloatingWhatsApp } from 'react-floating-whatsapp-button'
import 'react-floating-whatsapp-button/dist/index.css'

class Example extends Component {
  render() {
    return <FloatingWhatsApp />
  }
}
```

## Example

[https://arc9693.github.io/react-floating-whatsapp-button/](https://arc9693.github.io/react-floating-whatsapp-button/)

## Props(optional)

| Name            | Description                    | Type    | Default                       |
| --------------- | ------------------------------ | ------- | ----------------------------- |
| phone           | Phone number                   | string  | '1231231231'                  |
| message         | Sender's default message input | string  | ''                            |
| size            | Button size                    | string  | '70px'                        |
| backgroundColor | Button background color        | string  | '#25D366'                     |
| position        | left/right                     | string  | 'right'                       |
| popupMessage    |                                | string  | 'Hello, how can we help you?' |
| showPopup       |                                | boolean | false                         |
| showOnIE        |                                | boolean | true                          |
| autoOpenTimeout | in ms                          | number  | 2000                          |
| headerColor     |                                | string  | '#128C7E'                     |
| headerTitle     |                                | string  | 'WhatsApp Chat'               |
| zIndex          | z-index of the component       | number  | 0                             |
| buttonImage     | Base64 encoded button image    | string  | Whatsapp icon's image         |

## License

MIT © [arc9693](https://github.com/arc9693)

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