Skip to content

Astro

The SVG is inlined into the HTML at build time — zero client JavaScript.

Terminal window
pnpm add @fluentui-emoji/astro
---
import {Emoji} from '@fluentui-emoji/astro';
---
<Emoji name="rocket" />
<Emoji name="rocket" variant="high-contrast" width="40" />
<Emoji name="party-popper" title="Celebration!" />
  • name — typed slug (compile-time checked)
  • variantflat (default) · high-contrast · modern
  • title — accessible label; omitted → aria-hidden
  • any other attribute lands on the root <svg>

Need the raw string? loadEmojiSvg(name, variant, attrs) from the same package.