No longer mantained. Consider using svg-emojis.
Consistent emojis across devices.
Choose your emoji flavor from Twemoji, GitHub emojis, or OpenMoji.
GitHub | OpenMoji | |
---|---|---|
npm install --save switch-emoji
import { Semoji } from "switch-emoji";
export function SomeComponent() {
return <Semoji emoji="👋" source="GitHub" />;
}
You can wrap Semoji
to create you own Emoji
React component with your flavor of choice:
import React from "react";
import { Semoji, SemojiProps } from "switch-emoji";
type Props = Omit<SemojiProps, "source">;
export function Emoji(props: Props): JSX.Element | null {
return <Semoji {...props} source="Twitter" />;
}
Read the documentation 📘.
The component is written in TypeScript and type definitions are included.
All type of contributions are welcome!
Give a ⭐️ if you like this project!