API Reference
Sources
The config shapes register accepts.
SVG · { resolver }
| Option | Type |
|---|---|
resolver | (name, variant?) => string | { default: string } | Promise<…> - markup, URL or module |
mutator | (svg: SVGSVGElement) => void |
Cached per name and variant. Output <span class="icon-svg">.
Font · { className }
| Option | Type |
|---|---|
className | string |
mapping | Record<string, string> | (name, variant?) => string | undefined |
glyphs | Record<string, string> | (name, variant?) => string | undefined |
Glyph values: hex codepoint (e001), a character, or a ligature name. Output <i class="…">glyph</i>.
Your own · { resolveSync?, resolve?, dispose? }
Stored as is. Wrap in cached() for the SVG library's caching. See Your own source.