Components

Twemoji

Render Unicode emoji as Twemoji SVG images inline with text.

Loading…

Features

  • Consistent emoji rendering across all platforms and browsers.
  • Customizable image source for self-hosting or alternative CDNs.
  • Server component compatible.

Installation

pnpm dlx shadcn@latest add @ncdai/twemoji

Usage

import { Twemoji } from "@/components/twemoji"
<Twemoji>Hello from Viet Nam 🇻🇳</Twemoji>

API Reference

Twemoji

Prop

Type

Examples

Custom Source

<Twemoji
  source={(codePoint) =>
    `https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/${codePoint}.svg`
  }
>
  Hello from Viet Nam 🇻🇳
</Twemoji>

References

Command Palette

Search for a command to run...