Skip to content

Icon formats

iconctl writes Iconify JSON (and optional SVG files). That is the engineering source. How each app paints an icon is a separate choice. i-brand-arrow-left is a CSS class, usually a mask — not a font.

Catalog

Every paint scheme that has shown up in this product. Mainstream here means what new Web / mini-program UI actually ships in the 2020s, not what iconfont.cn still generates.

SchemeStatusJob
CSS maskMainstreamProduct UI + mini programs. iconctl default.
Inline SVGMainstreamVue/React components, animation, a11y.
Iconify runtimeMainstreamPublic sets / apps that already have @iconify/vue.
SVG fileSituationalIllustrations, logos, <img>.
CSS backgroundSituationalMulti-color icon as a CSS class.
Symbol spriteLegacy<use> / iconfont Symbol JS. Still common in CN.
WebfontLegacy@font-face + PUA. Still common in CN.

iconctl does not emit webfonts or symbol JS. iconfont Symbol URLs are an input. PNG / native iOS/Android vectors are out of scope.

Change color: mask / inline / runtime / symbol / webfont follow; img and CSS background stay amber.

CSS mask

Mainstream. mask-image plus background-color: currentColor. Same class API as iconfont (i-brand-arrow-left), no font metrics, tree-shaken by UnoCSS or @iconify/tailwind4. Monochrome only. This is the mini program recipe and iconctl’s Web default.

Follows the picker

<span class="i-demo-arrow-left"></span>

Inline SVG

Mainstream in component apps. Put <svg> in HTML or a Vue/React SFC — same paint. Full CSS, animation, aria / title. Repeating the same icon in markup is heavy. Mini programs do not consume SVG the way a browser does. The demo gallery inlines JSON body for preview; that is not the production class API.

Follows the picker

<svg viewBox="0 0 24 24" aria-hidden="true">…</svg>

Iconify runtime

Mainstream for public collections and apps that already run @iconify/vue (or the web component). JSON in, inline SVG out. Extra JS. Not a mini-program option. iconctl’s Web default still prefers build-time CSS.

Follows the picker

<Icon icon="demo:arrow-left" />

SVG file

Situational. <img src="arrow-left.svg">. Easy to cache. Color is baked in, so it will not follow text-primary. Mini programs often reject or rasterize SVG <image>. Use for illustrations and logos, not for a 24px UI set.

arrow-leftheartstaruser

Color baked in

<img src="arrow-left.svg" alt="" width="24" height="24">

CSS background

Situational. background-image data-URI or file, no mask. Multi-color survives; currentColor does not. Use when the asset is inherently multi-color and you still want a CSS class.

Color baked in

.icon { background: url("arrow-left.svg") center / contain no-repeat; }

Symbol sprite

Legacy, still common in Chinese iconfont workflows. One file of <symbol id>, then <svg><use href="#id"></use></svg>. iconfont “Symbol” is this plus a JS injector. currentColor works on the host SVG. External sprites hit CORS; the whole set downloads unless you regenerate per app. <use> is generally missing in WeChat / Alipay / Douyin. iconctl will not write this.

Follows the picker

<svg><use href="#arrow-left" /></svg>

Webfont

Legacy, still common via iconfont.cn. @font-face plus a Private Use Area glyph. Tiny HTML, familiar. Whole font ships, FOUT, baseline drift, PUA is not real text. The glyphs below are a demo font only (stroke icons collapsed to fills) — not an iconctl output. Do not generate a webfont from this pipeline. If you already have a Symbol CDN, ingest it and leave the font behind.

Follows the picker

<i class="icon-arrow-left"></i>

Scores (1–5)

No grand total. Webfont’s tiny HTML would win a sum; that is not this pipeline. The last row is fit for iconctl apps, not a universal ranking.

CSS maskInline SVGIconify runtimeSVG fileCSS backgroundSymbolWebfont
Theme / currentColor5551155
Multi-color1555521
Tree-shake5444521
Requests / cache5532432
Alignment5555542
Accessibility3553331
Mini program5112312
Animation2551132
Class-sized DX5242535
Fit for iconctl apps5332221

When to use what

SituationUseAvoid
Vite + UnoCSS / TailwindCSS mask, class i-{prefix}-{name}A new webfont
WeChat / Alipay / DouyinSame class names, CSS mask<use>, webfont, Iconify Vue
Few icons, motion or multi-color SVGInline SVG or Iconify runtimeMask (monochrome), webfont
Multi-color logo / illustration<img>, CSS background, or a rasterIconify / mask
Public set, already on @iconify/vueIconify runtimeRe-pipeline through iconctl
Legacy iconfont Symbol CDN{ type: 'iconfont' }, then paint with maskKeep shipping the font
Design / QA previewInline SVG gallery (iconctl preview / Demo)Treating preview as the production API

Extra: the four names people say

People often say “SVG / webfont / symbol / CSS mask”. Those four mix file format, transport, and paint method:

People sayWhat they usually mean
SVGInline <svg>, <img src="*.svg">, or CSS background-image
SymbolSVG sprite <symbol> + <use>, or iconfont.cn Symbol JS
CSS maskmask-image + background-color: currentColor
Webfont@font-face + PUA glyph

The catalog above is the split this product actually uses.