Status: future · Priority: medium · Depends on: Packages (distribution), Graphics APIs (GPU path choice)
Note: This is a future plan, not a commitment. The syntax and API shown here are proposals — they can be completely different when actually implemented.
Every app needs icons; nobody wants to hand-roll them. Today a Morph dev's options are "draw it with divs" or "ship PNGs at 6 resolutions and pray." Meanwhile the renderer's SDF shader stack (rounded rects today) is exactly the machinery vector icons want. This page turns the morph-icons package sketch from Tooling into a full design: first SVG, then the icon system on top.
<svg> element + path subset<svg width={24} height={24} viewBox="0 0 24 24">
<path d="M12 2 L2 22 H22 Z" fill="currentColor" />
</svg>Supported subset first: path (M/L/C/Z + fill), rect, circle, viewBox, fill="currentColor" (inherits text color — theming for free). Tessellate to triangles on the CPU at load; cache per (path, size) like the glyph cache. Full SVG (gradients, masks, text-on-path) is explicitly not v1 — that's a browser, and we are not building a browser. Again.
morph-icons packageimport { SearchIcon, CloseIcon } from 'morph-icons'
<SearchIcon size={20} color="muted" />currentColor default so icons follow text styling with zero propsmorph icons:add ./assets/my-icons/*.svg # compiles a project set into the binaryValidates paths at build time (morph check rejects unsupported SVG features with the offending element named — no silent missing icons at runtime).
| Piece | State |
|---|---|
| SDF shader stack (rounded rects) | ✅ Shipped |
| FreeType text pipeline (icon-font fallback possible) | ✅ Shipped |
<svg> element + path tessellation |
❌ Not built |
morph-icons package |
❌ Not started (sketch in Tooling) |
morph icons:add custom sets |
❌ Not built |
path/rect/circle/currentColor proposed; strokes? transforms?)<svg> + path/rect/circle subset with CPU tessellation + cachecurrentColor inheritance + morph check SVG validationmorph-icons first-party set (tree-shaken, SDF-crisp)morph icons:add for project sets