š An accessible Emoji component for Svelte applications
Emojis can add a light playfulness to your project but require some specific formatting in order to ensure they are accessible for all users. svelte-emoji's reusable Emoji component helps you do that quickly and painlessly.
This component was ported to Svelte from a11y-react-emoji.
Add svelte-emoji to your project:
npm install svelte-emoji
# or
yarn add svelte-emoji
Import Emoji, a default export, from svelte-emoji and add it to your code:
<script>
import Emoji from `svelte-emoji`
</script>
<footer>
Made with
{' '}
<Emoji symbol="š" label="love" />
{' '}
by Sean McPherson
</footer>
The Emoji component consumes two props: symbol and label. Every other prop is spread to the top-level <span> element.