# react-mailto-link

> A react component to create and display a mailto link in a more secure way.

Latest version **1.1.0** (published 2026-09-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-mailto-link
pnpm add react-mailto-link
yarn add react-mailto-link
bun add react-mailto-link
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2026-09-02 |
| First published | 2021-08-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 2 |
| Author | Theo |
| Maintainers | theo-mazars |
| Keywords | email, mailto, markup, react, react-component, wrapper |

## Links

- npm: https://www.npmjs.com/package/react-mailto-link
- Repository: https://github.com/theo-mazars/react-mailto-link
- Homepage: https://github.com/theo-mazars/react-mailto-link#readme
- Issues: https://github.com/theo-mazars/react-mailto-link/issues
- npm.io page: https://npm.io/package/react-mailto-link

## 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.1.0 (latest) — 2026-09-02
- 1.0.10 — 2026-07-15
- 1.0.9 — 2025-11-17
- 1.0.8 — 2025-07-22
- 1.0.7 — 2025-02-19
- 1.0.6 — 2024-11-12
- 1.0.5 — 2024-06-23
- 1.0.4 — 2024-04-24
- 1.0.3 — 2021-08-17
- 1.0.2 — 2021-08-17

## README

# react-mailto-link

[![CI](https://github.com/theo-mazars/react-mailto-link/actions/workflows/compile-test.yml/badge.svg)](https://github.com/theo-mazars/react-mailto-link/actions/workflows/compile-test.yml)
[![NPM](https://img.shields.io/npm/dw/react-mailto-link)](https://img.shields.io/npm/dw/react-mailto-link)

> A react component to create and display a [mailto](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Email_links) link in a more secure way.

> Inspired by https://github.com/jasonbellamy/react-mailto

## Getting Started

- Install from [NPM](https://www.npmjs.org/)
  - `npm install --save react-mailto-link`
  - `yarn add react-mailto-link`

## Usage

```javascript
import React from "react";
import Mailto from "react-mailto-link";

const Component = () => {
  return <Mailto email="john.doe@example.com" obfuscated={true} />;
};

// OR

const Component = () => {
  return (
    <Mailto email="john.doe@example.com" obfuscated={true}>
      <div>Custom Children</div>
    </Mailto>
  );
};

export default Component;
```

## Options

| Property   | Type      | Argument     | Default | Description                                                                                                                                                                                               |
| ---------- | --------- | ------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| email      | `string`  | `<required>` | `null`  | email address of the intended recipient.                                                                                                                                                                  |
| obfuscated | `boolean` | `<optional>` | `false` | show the email address in the status bar.                                                                                                                                                                 |
| headers    | `object`  | `<optional>` | `null`  | any standard mail header fields. The most commonly-used of these are "subject", "cc", and "body" (which is not a true header field, but allows you to specify a short content message for the new email). |

## Developing

[react-mailto-link](https://github.com/theo-mazars/react-mailto-link) is built using **ES6**. Run the following task to compile the `src/` into `lib/`.

```bash
$ npm run build
# OR
$ yarn build
```

## License

&copy;2015 [Jason Bellamy](http://jasonbellamy.com)

&copy;2021 [Theo Mazars](http://theomazars.com)

Licensed under the MIT license.

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