A simple svelte wrapper for twemoji
. Now you can just drop twemoji
action into
your component and all emojis will become consistent across all platforms.
<script>
import {twemoji} from 'svelte-twemoji';
</script>
<p use:twemoji>
This emoji will be transformed into an image: ✨.
</p>
You can also specify how twemoji will process the contents using a configuration object or a callback function.
See twemoji's README for detailed documentation on this feature. See below for an example:
<script>
import {twemoji} from 'svelte-twemoji';
</script>
<p use:twemoji={{ className: 'my-awesome-emoji' }}>
This emoji will be transformed into an image: ✨.
</p>
You betcha!
<meta charset="utf-8">
Thank you Twitter for providing twemoji. It's awesome.
Code licensed under the MIT License: http://opensource.org/licenses/MIT
As per the Twemoji repository, the graphics are licensed under the CC-BY 4.0 which has a pretty good guide on best practices for attribution. Please adhere to the attribution requirements when using these emojis.