How to Use Emojis as Icons

webdev

Icons have become an important part of web designs. Granted there are many online resources (both free and paid) for icons, we still should be able to use the one style of symbols we already have and are uber familiar with — emojis, as icons.

Adding to that, icon image resources will need to be fetched by your webpage whereas emojis are simple characters that’re similar to text and are already present in your HTML, making them a better alternative to traditional icon images.

Using emojis as it is won’t be a problem: we simply add it as text to the HTML via an emoji keyboard or use their set of unicode characters, but this isn’t what prefered for icons.

Icons are shapes, typically, made of a single color block. This can be achieved with emojis using text-shadow!

The transparent color hides the actual emoji and in its place we see the shadow behind.

This is not the only way this effect can be achieved. You can also use background-clip.

With background-clip, if you use gradient backgrounds for the icons, you’ll get gradient icons.

Advertisements

The Author

Web developer and writer. @rpsthecoder in Twitter.