@svgmoji/noto
The svgmoji sprites for the
noto-emoji
library.
Installation
# yarn
yarn add @svgmoji/noto
# pnpm
pnpm add @svgmoji/noto
# npm
npm install @svgmoji/noto
Usage
The following code creates an image with a src applied from the cdn. The first it is used it loads the sprite of all the emojis.
import { Notomoji } from '@svgmoji/notomoji';
import data from 'svgmoji/emoji.json';
const notomoji = new Notomoji({ data, type: 'all' });
const image = document.createElement('img');
image.src = notomoji.url('❤️');
document.body.append(image);
html
<!-- Individual 2KB -->
<img
width="40px"
height="40px"
src="https://cdn.jsdelivr.net/npm/@svgmoji/noto@0.2.0/svg/1F44D.svg"
alt="thumbs up"
title="thumbs up"
/>
<!-- Subgroup Bundle 31KB -->
<img
width="40px"
height="40px"
src="https://cdn.jsdelivr.net/npm/@svgmoji/noto/sprites/subgroups/face-affection.svg#1F385"
/>
<!-- Group Bundle 417KB -->
<img
width="40px"
height="40px"
src="https://cdn.jsdelivr.net/npm/@svgmoji/noto/sprites/group/smileys-emotion.svg#1F441-FE0F-200D-1F5E8-FE0F"
/>
<!-- Full Bundle 23.6MB -->
<img
width="40px"
height="40px"
src="https://cdn.jsdelivr.net/npm/@svgmoji/noto/sprites/all.svg#1F441-FE0F-200D-1F5E8-FE0F"
/>