React component to protect email addresses from crawlers.
npm install react-protected-mailtoFork of react-obfuscated that went it's own way.
- react-protected-mailto
- How it works
- Why
- Installation
- Input
- Output
- Robot Interaction
- Human Interaction
- Options
- Development
- Contributors
- Contributing
- To Do
- License
email, tel, sms, or facetime` prop. The component obfuscates href data until an onClick event. Links are given their proper URL schemes (mailto, facetime, etc.) The link is rendered in reverse in the dom, but reversed again with css. This making the link useless for spammers, but user friendly on screen.Why
The world needs obfuscated links that display the link in a friendly way.Installation
`bash
npm install --save react-protected-mailto
`$3
`javascript
import React from 'react'
import Mailto from 'react-protected-mailto'export default () => (
Phone:
Email: email='hello@coston.cool'
headers={
{subject:'Question from the website'},
{cc:'friend@coston.cool'}
}/>
)
`$3
#### Robot Interaction
`html
Phone: 4321-454-502
Email: looc.notsoc@olleh
`#### Human Interaction
`html
Phone: 205-454-1234
Email: hello@coston.cool
`Options
Prop | Type | Argument | Default | Description
-------------- | --------- | ------------ | --------------- | ------------------------------------------
email |
string | | null | email address of the intended recipient
tel | string | | null | telephone number of the intended recipient
sms | string | | null | sms number of the intended recipient
facetime | string | | null | facetime address of the intended recipient
headers | object | | null | subject, cc, bcc, body, etc
obfuscate | boolean | | true | set to false to disable obfuscation
obfuscatedHref | string | | click-to-open | text to put in a href
Development
`bash
npm run build
``