Short answer: For most new websites, ship icons as inline SVG (or SVG components, if you build with React or a similar framework) or as an SVG sprite referenced with <use>. Both render as graphics rather than text, take their colour from CSS and are easier to make accessible. An icon font still has a place in older codebases built around icon classes, and for single-colour sets that need to drop into many pages through one stylesheet.
You have forty icons in a Figma file, and a developer asks how you want them delivered. There are three common answers, plus an older fourth. This post compares them on what matters after launch, including what breaks, then shows how to make each one from Figma.
What are the three ways to ship icons?#
You can ship icons as characters in a font, as <symbol> elements in one SVG file that pages point to, or as <svg> markup written straight into the page. A fourth, older option is a PNG sprite sheet positioned with CSS.
- Icon font. A font file in which each icon is a glyph, the shape a font draws for a character. CSS puts the character on the page, usually through a
::beforerule with a code point such as\e001. You size it withfont-sizeand colour it withcolor, exactly like text. - SVG sprite. One SVG file that holds every icon as a
<symbol>with its ownid. MDN describes<symbol>as a template that is never drawn by itself: only the copies created by a<use>element are rendered (MDN: symbol). - Inline SVG. The full
<svg>markup for each icon sits in the HTML, or inside a component that outputs it. There is nothing extra to download. - PNG CSS sprite. One PNG image holding every icon in a grid. Each icon is shown with
background-imageand abackground-positionoffset. It still works, but it is raster.
Icon font vs SVG sprite vs inline SVG: comparison table#
Inline SVG and SVG sprites win on rendering, colour and accessibility. Icon fonts win mainly on drop-in convenience for single-colour sets, and PNG sprites only make sense for raster artwork or old code.
| Icon font | SVG sprite (<use>) |
Inline SVG | PNG CSS sprite | |
|---|---|---|---|---|
| What the browser draws | A text glyph | A vector graphic | A vector graphic | A bitmap |
| Colours per icon | One, from color |
One is easy with currentColor, more takes work |
Any, per path | Fixed in the image |
| Scales without pixelation | Yes | Yes | Yes | No, fixed pixels |
| Waits for a font to load | Yes | No | No | No |
| Separate cacheable file | Yes | Yes, if the sprite is external | No in HTML; cached with the JS bundle in apps | Yes |
| Served from another domain | Needs CORS headers | Browsers may refuse | Not applicable | Works like any image |
| Where the accessible name goes | On the button or link; hide the glyph | On the button, link or <svg> |
On the button, link or <svg> |
On the element, since background images have no alt text |
| Animate parts of an icon | No | Limited | Yes | No |
Sources for the font and <use> rows: MDN on @font-face and MDN on <use>, checked in October 2026.
Icon fonts: how they work and where they break#
An icon font usually maps each icon to a character in the Unicode Private Use Area (some use ligatures instead), and CSS inserts that character. It is quick to adopt, but the icon is text, so anything that delays, blocks or replaces fonts does the same to your icons.
The Private Use Area is a range of code points that Unicode leaves without a standard meaning. In the Basic Multilingual Plane it runs from U+E000 to U+F8FF, 6,400 code points whose meaning is agreed privately by the people using them (Unicode FAQ). So your icons never collide with real letters. It also means that when your font is missing, other fonts usually have no matching character, so the browser draws an empty box or the wrong glyph.
Here is what goes wrong in practice.
- The font is late. MDN describes a font display timeline. During the block period, text set in a font that has not loaded is drawn with an invisible fallback. During the swap period, a visible fallback is drawn instead (MDN: font-display). For an icon font, that means a gap where the icon should be, or a stray fallback character.
- The reader overrides fonts. When GitHub moved its Octicons from an icon font to SVG in 2016, it wrote that people who change their fonts saw empty squares instead of icons, which broke layouts and carried no meaning (GitHub blog).
- The icon is rendered as text. GitHub also found that sub-pixel rendering meant for text made its icons blurry in WebKit browsers at some window widths. Browsers have changed since 2016, so treat this as a risk to check, not a certainty.
- One colour per glyph. A glyph takes the text colour. Two-tone icons need two stacked glyphs or a different method.
- Hosting rules. MDN notes that web fonts must come from the same domain as the page unless the server allows them with CORS headers.
So why would anyone still choose one?
Because sometimes it is the cheapest correct answer. If a product already has <i class="icon-..."> across hundreds of templates, replacing the delivery method may cost more than it saves. If the set is single-colour and the people adding icons work in a CMS where a class name is all they can type, a font is easy to hand over. And an icon font behaves like text by default: it sits on the baseline and scales with the sentence around it.
How do SVG sprites with <use> work?#
You put every icon in one SVG file as a <symbol> with an id and a viewBox, then draw each icon with a small <svg> that contains <use href="file.svg#id">. The browser downloads the sprite once and reuses it wherever an icon appears.
<!-- icons.svg -->
<svg xmlns="http://www.w3.org/2000/svg">
<symbol id="search" viewBox="0 0 24 24">
<path fill="currentColor" d="..."/>
</symbol>
</svg>
<!-- in the page -->
<button type="button">
<svg width="24" height="24" aria-hidden="true">
<use href="/icons/icons.svg#search"></use>
</svg>
Search
</button>Three details save you a debugging session.
Styling reaches the icon only partly. MDN explains that <use> behaves as if the referenced nodes were deep-cloned into a hidden DOM, and that CSS properties are not guaranteed to reach that clone unless you request inheritance explicitly. The usual pattern is fill="currentColor" on the paths inside each symbol, so the icon picks up the text colour of whatever contains it. Multi-colour icons are possible but take more planning.
Use href, not xlink:href. MDN lists xlink:href as deprecated since SVG 2.
Keep the sprite on the same origin. MDN warns that browsers may refuse a cross-origin URL in href, and that there is currently no defined way to set a cross-origin policy for <use>. GitHub hit this too: its post says its cross-domain policy made external sprites hard to serve, so it inlined its icons. If your static files live on a CDN domain, serve the sprite from the page's own domain, or paste the <symbol> block into the page once, hidden, and reference it with #id.
An SVG sprite suits server-rendered and multi-page sites, where the same icons repeat across many pages and you want each page's HTML to stay small.
When should you use inline SVG?#
Use inline SVG when you build with components, or when you need to style or animate individual paths. Each icon's markup sits in the page or inside a component, so nothing extra loads, but every page or bundle carries that markup.
This is the most flexible option. You can colour each path separately, change a stroke on hover or animate one part of an icon, because the paths are ordinary elements in the page.
In component frameworks that usually means one component per icon. SVGR, for example, turns SVG files into React components. If some of your icons are still PNGs, SVG vs PNG for icons and logos covers which format each one should be.
The trade-off is weight. In server-rendered HTML, every icon on every page repeats its path data, and none of it is cached separately. In a JavaScript app, each icon component sits once in the bundle and is cached with it, but it still adds to the bundle every page loads. Clean exports matter most here, because every extra attribute ends up in your HTML or bundle.
How accessible is each method?#
All four can be accessible, and the rule is the same for each: hide the decorative icon from assistive technology and give the button or link its accessible name. And when a reader blocks or replaces page fonts, an SVG icon still draws its shape, while an icon font may show an empty box.
Sara Soueidan compared ways to label icon buttons. She recommends putting the label on the button itself: visually hidden text, aria-labelledby pointing to hidden text, or aria-label on the button. She advises against relying on the SVG itself for the name, because the testing she cites found failures in every case (Sara Soueidan: accessible icon buttons). She also points to many reasons SVG suits icons better than icon fonts. Her examples add focusable="false" to the <svg>, which stops Internet Explorer from adding a second tab stop. That only matters if you still support old IE, so the samples here leave it out.
An icon-only button with a sprite icon looks like this:
<button type="button" aria-label="Close">
<svg width="24" height="24" aria-hidden="true">
<use href="/icons/icons.svg#close"></use>
</svg>
</button>For each method:
- Icon font. MDN's page on
aria-hiddenuses an icon font as its example: the icon<span>getsaria-hidden="true"and sits next to a visible text label (MDN: aria-hidden). Font Awesome's documentation says its own web font icons are ignored by assistive technology by default, and that icon-only buttons need anaria-labelon the button, not the icon (Font Awesome accessibility docs). For a font you generated yourself, addaria-hidden="true"yourself. - SVG sprite and inline SVG. Same pattern:
aria-hidden="true"on the<svg>, name on the control. MDN warns never to putaria-hidden="true"on a focusable element or its parent, so it belongs on the icon, never on the button. - PNG CSS sprite. A CSS background image has no alt text, so the element needs a visible or visually hidden text label.
Which icon method loads fastest?#
It depends on how many icons a page uses and how many pages a visitor sees. Icon fonts and external SVG sprites are one cached file shared across pages, while inline SVG needs no extra request but adds bytes to every page or bundle.
- Icon font. The whole set downloads even if a page uses three icons, and drawing waits on the font. Once cached, later pages get the icons without another download. MDN recommends WOFF2 for web delivery, because it compresses better than older font formats.
- SVG sprite. Also one file, also cached, also downloaded in full. Drawing does not wait on a font. If one area of your site uses a very different set, split the sprite in two.
- Inline SVG. Icons paint with the HTML, with no flash while a file loads. GitHub reported that switching to SVG removed the flash of unstyled content it had seen while its icon font loaded. The cost is repeated bytes on every page, or a bigger bundle in a JavaScript app.
- PNG sprite. One image request. A 1x sheet looks soft on high-density screens, so a sharp sprite needs a 2x sheet scaled down with
background-size.
We have not benchmarked these methods against each other. If the choice is close, build one real page both ways and measure it.
Which should you choose for your project?#
Pick by how your site is built and how your icons behave. For most new work that points to inline SVG or an SVG sprite.
| Your situation | Use | Why |
|---|---|---|
| A React, Vue or Svelte app | Inline SVG components | Icons are components already, and you can style every path |
| A server-rendered or multi-page site with a shared set | SVG sprite on the same origin | One cached file, small HTML, graphics instead of text |
| A legacy site with icon classes in hundreds of templates | Keep the icon font | Changing delivery costs more than it saves; add aria-hidden and font-display: block |
| Multi-colour or animated icons | Inline SVG | The only option here that styles individual paths without workarounds |
| Raster or illustrated icons with shading | PNG at 2x | Vector methods cannot hold bitmap detail |
| Icons inside running text | Inline SVG sized in em, or an icon font |
Both scale with the sentence |
How to make each one from Figma#
Figma exports single SVG files on its own. Inside Figma, an icon font, a PNG sprite or an SVG sprite needs a plugin, and developers can also build any of them from exported SVGs in their own tooling. UIXport makes the icon font, the PNG sprite and clean per-icon SVGs. It does not make an SVG sprite.
Inline SVG or SVG components. Figma Design exports PNG, JPG, SVG and PDF natively, with SVG options such as Outline text and Include "id" attribute (Figma help: export formats and settings). Figma export settings explained says when to change each one. In UIXport's Exporter tab, change the default row's format from PDF to SVG. Clean SVG Markup (Remove Figma properties), under Advanced settings, is on by default and runs SVGO over each file. The Free plan has no export limit, so forty SVGs export in one run. The SVG export page has the details.
SVG sprite. Not in UIXport. Icon sprite generator by Ethan Roxburgh is built for it (Figma Community). Its listing says it picks icons from the selection or by a layer-name keyword, can set symbol colours to currentcolor, defaults symbols to 24 by 24 and can optimise the output with SVGO. As of October 2026 it is published under Figma's Community Free Resource License. Its last update listed on Figma Community is from March 2023, so test it on a copy of your file first.
Icon font. UIXport's Icon Font tool compiles your selection into UIXportFont.ttf and UIXportFont.css. Each icon gets a code point from U+E001 upwards and a class .ex-icon-{name}, used together with the base .ex-icon class. All <path d> data in an icon is merged into one glyph, so the steps below start with preparing the icons.
If you need WOFF2 or ligatures, Icon font generator by Victor Assis is the better choice (Figma Community). Its listing names SVG, EOT, TrueType, WOFF and WOFF2 fonts, a symbol-defs SVG, separate vectors and a JSON config, with optional ligatures. It also warns that strokes, or anything other than a single path, cause errors, so prepare icons as you would for UIXport. As of October 2026 it is also under the Community Free Resource License.
PNG CSS sprite. UIXport's CSS Sprite tool packs the selected icons into one grid and writes a .ex-sprite base class plus one .ex-sprite-{name} class per icon with its size and background-position.
Steps to build an icon font or PNG sprite in UIXport#
Both tools live in the Dev tools tab: select your prepared icon frames, pick the tool, generate, then download a ZIP.
- Prepare the icons. For a font, outline strokes, flatten the shapes inside each icon frame and keep whole-pixel frame sizes. For either tool, give every icon a clear, unique layer name.
- Select them. Select the icon frames on the canvas.
- Open Dev tools. Click the Dev tools tab. The panel is headed Developer handoff. If nothing is selected, it shows No Frames Selected.
- Pick the tool. Under Tools, choose Icon Font or CSS Sprite.
- Generate. For a font, click Compile Icon Font. For a sprite, set Cell columns and Cell padding under Grid settings, then click Generate Sprite Sheet.
- Check and download. Review Compiled Glyphs or the Live sprite preview. Then click Download Font ZIP for
icon-font-assets.zip, or Download ZIP Bundle forspritesheet-assets.zipwithspritesheet.pngandspritesheet.css.
Icon fonts and sprite sheets are on the Free plan with no limit. Only Dev tools' React and Vue icon components are Pro. The work runs inside the plugin, so your icons are not uploaded.
For a new project, the clean SVGs are usually the better export. For a codebase that already runs on icon classes, the font keeps it working without a rewrite.
Try UIXport from Figma Community and export your next icon set the way your codebase actually uses it.