You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
morphicons/element — the <morph-icon> custom element, fifth binding. The binding for hosts without a component runtime: plain HTML, HTMX, Rails, anything server-rendered. Same three modes and the same lifecycle contract as the framework bindings, pinned by the same mirrored mount suite: icon (uncontrolled), from/to/progress (controlled), morphTo/set methods (imperative — the element IS the handle). Attributes carry strings (d paths, spring preset names) for HTML authoring; properties accept the full surface (IconNodes, custom springs) for scripts. A server-rendered <svg><path> inside the element is adopted verbatim — same node, zero d writes during upgrade (the first mount swallows the driver's initialization re-derivations through a write-gated PathEl), pinned by instrumented tests — and its d becomes the at-rest icon, so a script can morph away from SSR markup directly. Imperative calls before the element connects honor the lifecycle contract too: they exit controlled mode, so a pending from/to pair never silently wins the mount over a set/morphTo. defineMorphIcon() registers the tag (idempotent, custom tags supported); the module is safe to import during SSR — only defining/upgrading needs a browser. Zero dependencies, no peer. 8.77 KB gzip all-in.
morphicons/astro — Astro binding as an SSR shell over the element. A logic-free .astro component (ships as source, the consumer's Astro compiles it — no peer, no runtime): the server emits the exact static SVG with the pure core, and hydration is just custom-element upgrade — the only client bytes are morphicons/element, no framework runtime. A controlled pair of d strings survives upgrade as attributes (both endpoints or none — half a mixed pair would mount from the lone endpoint), so assigning progress from a script scrubs the server-frozen pair; IconNode pairs stay server-only. Rest attrs (id, class, data-*) land on <morph-icon> because grabbing the element from a client script is the interaction model. Islands with the React/Vue/Svelte bindings remain the right call for icons inside one; this entry is for pages that don't need an island at all. Decision record in docs/adr/0003.
Internal: the Svelte binding's controller (the lifecycle contract as code) moved from src/svelte/shared.ts to the framework-neutral src/dom/controller.ts and is now shared verbatim by Svelte and the element. Existing entries are byte-identical; src/svelte/shared.ts re-exports it, so nothing changes for Svelte consumers.