On this page
Server-side rendering
Render icons on the server with components or toSvg.
React on the server
Icon components are pure: no hooks, effects or browser APIs. They work in Server Components, renderToString and streaming SSR. See Next.js.
Strings anywhere
toSvg runs in Node, edge runtimes, Workers and email templates.
import { IconCheck, toSvg } from "@axcore/xicons";
const html = `<p>${toSvg(IconCheck, { width: 16, height: 16 })} Order confirmed</p>`;Cold starts
The project reports that importing @axcore/xicons takes about 50 ms in Node, because all icons are in one file.
Something wrong or missing?Open an issue