# react-floating-mailbox

> A React component that renders a floating mailbox action button on your page. When the button is clicked, it opens a modal that allows users to send a feedback/suggestion email using EmailJS.

Latest version **1.0.15** (published 2023-04-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-floating-mailbox
pnpm add react-floating-mailbox
yarn add react-floating-mailbox
bun add react-floating-mailbox
```

## 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.0.15 |
| Published | 2023-04-26 |
| First published | 2023-04-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Tony Montes |
| Maintainers | t-montes |
| Keywords | react, floating, suggestion, box, button, mail, email, suggestion, suggestion box, suggestion button, suggestion mail, suggestion email |

## Links

- npm: https://www.npmjs.com/package/react-floating-mailbox
- Repository: https://github.com/t-montes/react-floating-mailbox
- Homepage: https://github.com/t-montes/react-floating-mailbox#readme
- Issues: https://github.com/t-montes/react-floating-mailbox/issues
- npm.io page: https://npm.io/package/react-floating-mailbox

## Dependencies (1)

- [emailjs-com](https://npm.io/package/emailjs-com.md) ^3.2.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.0.15 (latest) — 2023-04-26
- 1.0.14 — 2023-04-26
- 1.0.13 — 2023-04-25
- 1.0.12 — 2023-04-25
- 1.0.11 — 2023-04-25
- 1.0.10 — 2023-04-24
- 1.0.9 — 2023-04-24
- 1.0.8 — 2023-04-11
- 1.0.7 — 2023-04-11
- 1.0.6 — 2023-04-11

## README

# React Floating Mailbox

`react-floating-mailbox` is a React component that renders a floating mailbox button on your page. When the button is clicked, it opens a modal that allows users to send an email using EmailJS.

[![npm version](https://img.shields.io/npm/v/react-floating-mailbox.svg)](https://www.npmjs.com/package/react-floating-mailbox)
[![npm downloads](https://img.shields.io/npm/dm/react-floating-mailbox)](https://www.npmjs.com/package/react-floating-mailbox)
[![npm size](https://img.shields.io/bundlephobia/min/react-floating-mailbox)](https://www.npmjs.com/package/react-floating-mailbox)
[![license](https://img.shields.io/github/license/t-montes/react-floating-mailbox)](/LICENSE)

<p align="center">
  <img src="./resources/example-react-floating-mailbox.gif" alt="example"  style="width:100%;min-width:300px;"/>
</p>

## Installation

To install react-floating-mailbox, run the following command:

```sh
npm install react-floating-mailbox
```

## Usage

To use `react-floating-mailbox`, simply import the `FloatingMailbox` component and render it in your React app:

```jsx
import React from 'react';
import FloatingMailbox from 'react-floating-mailbox';

function App() {
  return (
    <div>
      <h1>My App</h1>
      <FloatingMailbox
        serviceId="YOUR_EMAILJS_SERVICE_ID"
        templateId="YOUR_EMAILJS_TEMPLATE_ID"
        userId="YOUR_EMAILJS_USER_ID"
        to="recipient@example.com"
        subject="Hello from react-floating-mailbox"
      />
    </div>
  );
}
```

The following props can be set to the `FloatingMailbox` component:

- `serviceId`: The ID of the EmailJS service you want to use.
- `templateId`: The ID of the EmailJS email template you want to use.
- `userId`: The ID of your EmailJS user account.
- `to`: (Optional) The email address to send the email to. If omitted, the user will be prompted to enter an email address.
- `subject`: (Optional) The default subject for the email. If omitted, the user will be prompted to enter a subject.
- `header`: (Optional) The header text to display in the modal. If omitted, no header text will be used.
- `lang`: (Optional) The language to use for the modal. If omitted, the language will default to English. Currently supported languages are English (`en`) and Spanish (`es`).

## Contributing

Contributions to `react-floating-mailbox` are always welcome! If you have an idea for a new feature or improvement, feel free to open an issue or submit a pull request.

## License

`react-floating-mailbox` is licensed under the [MIT License](/LICENSE)

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