20 Iconify packs · copy SVG, PNG, React, Vue, and more 20 Iconify packs Open registry →

SVG icons in Astro

Astro renders the markup on the server. An inline SVG is just HTML, so the icon is in the first response and does not need a component library.

Copy the SVG from an icon page. If the glyph is a stroke icon, leave fill and stroke as currentColor so the surrounding text color applies.

<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">…</svg>