Obfuscate email addresses from bots in your svelte project
First you need a Svelte 3 project. Its starter template lives at https://github.com/sveltejs/template.
Then install the component by running the following command in your project's directory:
npm install svelte-hidden-email
<a>
tagimport HiddenEmail from 'svelte-hidden-email/src/index.js'
<HiddenEmail to="[email protected]" title="Send us an email" />
If you input an invalid email address nothing will be rendered and a console error will be produced.
The email is rendered inside a CSS psuedo-element leaving the <a>
tag empty.
Feel free to fork. If you find a bug or got something great to add make a pull request!
You can also look at the list of all the contributors who have participated in this project.
This project is free to use, edit & distribute under the GNU GPLv3 License.
āØļø with ā¤ļø by rallisf1 š