# react-mail-icon

> Simple, animated, and customizable React mail icon.

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

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install react-mail-icon
pnpm add react-mail-icon
yarn add react-mail-icon
bun add react-mail-icon
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2019-09-25 |
| First published | 2019-09-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | William Grosset |
| Maintainers | williamgrosset |
| Keywords | react-component, jsx, mail, icon |

## Links

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

## 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.6 (latest) — 2019-09-25
- 1.0.5 — 2019-09-25
- 1.0.4 — 2019-09-25
- 1.0.3 — 2019-09-25
- 1.0.2 — 2019-09-25
- 1.0.1 — 2019-09-25
- 1.0.0 — 2019-09-25

## README

<h1 align="center">
	<img alt="React Mail Icon" src="https://user-images.githubusercontent.com/16131737/65396536-0b6e0480-dd5c-11e9-896d-c11d0bc70e84.gif">
</h1>

> 📧 Simple, animated, and customizable mail icon.

## Install
```
$ npm install react-mail-icon
```

## Usage
```jsx
import React, { useState } from 'react'
import { MailIcon } from 'react-mail-icon'

const mailIconStyle = {
  display: 'flex'
} as React.CSSProperties

const App: React.FC = () => {
  const [shouldAnimate, setAnimation] = useState<boolean>(false)
  return (
    <div>
      <MailIcon
        style={mailIconStyle}
        mailBackFoldColor="#2874A6"
        mailTopFoldColor="#2E86C1"
        mailLeftFoldColor="#3498DB"
        mailRightFoldColor="#5DADE2"
        letterBackgroundColor="#FFFFFF"
        letterBorderColor="#1ABC9C"
        letterTextColor="#1ABC9C"
        shouldAnimateOpen={shouldAnimate}
        shouldAnimateDown={shouldAnimate}
        shouldAnimateOnHover
      />
      <button onClick={() => setAnimation(!shouldAnimate)}>Trigger animation</button>
    </div>
  )
}

export default App
```

## Props
#### style

Type: `Object`<br>
Optional: `true`

CSS styling for the component.

#### mailBackFoldColor

Type: `String`<br>
Default: `#2874A6`<br>
Optional: `true`

Color of the mail back fold.

#### mailTopFoldColor

Type: `String`<br>
Default: `#2E86C1`<br>
Optional: `true`

Color of the mail top fold.

#### mailLeftFoldColor

Type: `String`<br>
Default: `#3498DB`<br>
Optional: `true`

Color of the mail left fold.

#### mailRightFoldColor

Type: `String`<br>
Default: `#5DADE2`<br>
Optional: `true`

Color of the mail right fold.

#### letterBackgroundColor

Type: `String`<br>
Default: `#FFFFFF`<br>
Optional: `true`

Color of the letter background.

#### letterBorderColor

Type: `String`<br>
Default: `#1ABC9C`<br>
Optional: `true`

Color of the letter border.

#### letterTextColor

Type: `String`<br>
Default: `#1ABC9C`<br>
Optional: `true`

Color of the letter text.

#### shouldAnimateOpen

Type: `Boolean`<br>
Default: `false`<br>
Optional: `true`

If `true`, the mail should animate open and the letter should animate up.

#### shouldAnimateDown

Type: `Boolean`<br>
Default: `false`<br>
Optional: `true`

If `true`, the mail should animate down when opened.

#### shouldAnimateOnHover

Type: `Boolean`<br>
Default: `false`<br>
Optional: `true`

If `true`, the mail should animate when hovered (`shouldAnimateOpen` takes precendence).

## License
MIT

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