Socket
Book a DemoInstallSign in
Socket

react-obfuscate-email

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-obfuscate-email

[![React Obfuscate Email](https://badgen.net/npm/v/react-obfuscate-email)](https://www.npmjs.com/package/react-obfuscate-email) [![CI](https://github.com/MauricioRobayo/react-obfuscate-email/actions/workflows/main.yml/badge.svg)](https://github.com/Mauric

latest
Source
npmnpm
Version
2.0.4
Version published
Weekly downloads
668
-18.93%
Maintainers
1
Weekly downloads
 
Created
Source

React Obfuscate Email

React Obfuscate Email

📧🚫🤖 Lightweight email obfuscator React component.

Until you hover or focus on the link, the @ symbol is stripped out and rendered using ::after css pseudo-element, and the href attribute value is replaced with #.

Installation

npm install --save react-obfuscate-email

Usage

import { Email } from "react-obfuscate-email";

export default function SomeComponent() {
  return <Email email="test@example.com">📧 Email me!</Email>;
}

Examples

Inspect the element without hovering or focusing on it to see what's actually rendered:

<Email
  email="cick@me.com"
  body="You rock!"
  subject="Hi 👋"
  cc={["cc1@example.com", "cc2@example.com"]}
  bcc={["bcc@example.com"]}
>
  📧 Click me!
</Email>

You can pass any children to control the displayed text of the link:

<Email email="cick@me.com">📧 Click me!</Email>

You can pass any valid a tag attributes, like target or title:

<Email
  email="cick@me.com"
  title="📧 Email me!"
  target="_blank"
  rel="noopener noreferrer"
>
  📧 Email me!
</Email>

Props

NameTypeRequiredDefaultDescription
emailstringYesE-mail recipient address
childrenReactNodeNoemailContent to display in the link
subjectstringNo""Subject of e-mail
bodystringNo""Body of e-mail
ccstring[]No[]Carbon copy e-mail addresses
bccstring[]No[]Blind carbon copy e-mail addresses
...propsAnchorHTMLAttributesNoAny valid tag attribute (e.g. target, rel, title)

TypeScript

The component is written in TypeScript and type definitions are included.

License

MIT

Show your support

Give a ⭐️ if you like this project!

LICENSE

MIT

Keywords

email

FAQs

Package last updated on 10 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts