Download Latest Version v1.7.1 source code.zip (529.0 kB)
Email in envelope

Get an email when there's a new version of Morphicons

Home / v1.4.2
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-08-06 7.5 kB
v1.4.2 source code.tar.gz 2026-08-06 369.1 kB
v1.4.2 source code.zip 2026-08-06 433.3 kB
Totals: 3 Items   809.9 kB 0

Added

  • reducedMotion policy: "never" | "user" | "always". A prop on MorphIcon in the four bindings (React, Vue, Svelte, React Native) and an option on the vanilla driver, createMorph(el, icon, { reducedMotion }), plus a live morph.reducedMotion property. "user" honors the OS reduce-motion setting (prefers-reduced-motion on the web, AccessibilityInfo on React Native, whose accessibility bridge is now only touched when some instance opts in), "always" makes every morphTo an instant swap (tests, screenshots), "never" always animates. The policy is live: changing the prop governs the next morph, even when it changes in the same update as the icon.

Changed

  • Morphs now play by default even when the OS reduce-motion setting is on (reducedMotion defaults to "never", the same default Motion, formerly Framer Motion, ships). Up to 1.4.1 every morphTo silently degraded to an instant swap under reduce motion, which read as "the animation is broken" for users who have the setting on for battery or focus reasons: icon morphs are small, short, communicative micro-transitions, not the large movement the setting targets. To restore the previous behavior, pass reducedMotion="user"; apps that must strictly follow the user's system preference should do exactly that.

Fixed

  • SSR hydration mismatch on icons with non-cardinal arcs (e.g. lucide's eye). The canonical d was emitted at full float precision, and arc→cubic conversion goes through trig whose last ulp differs across JS engines: the server's markup and the browser's recomputation could disagree in the final digit, which hydration flags as a mismatch (observed in Next with the React binding; the same bytes reach Vue and Svelte SSR). Canonical emission is now quantized to 4 decimals, invisible on the 24px grid (max deviation 5e-5), making the bytes engine-independent. Applies everywhere the canonical d is produced: the bindings' SSR/at-rest markup, the driver's settle snap and fitIcon output. Pinned by a 1-ulp perturbation test in core plus mirrored SSR stability tests in the four binding suites.

1.4.0 - 2026-08-04

Added

  • morphicons/react-native — React Native binding. The same MorphIcon as the web bindings — uncontrolled (icon prop), controlled (from/to/progress) and imperative (ref → morphTo/set) modes, the shared lifecycle contract, lucide-style presentation props and accessibility defaults (labelrole="img" + aria-label, hidden otherwise) — rendered through react-native-svg. The dom driver is reused verbatim as the engine: per-frame d writes go through Path.setNativeProps, outside the React render, exactly like the web mutation. Reduced motion honors the OS setting via AccessibilityInfo (best-effort initial query + reduceMotionChanged subscription). Optional peers react-native >= 0.71 and react-native-svg >= 14; needs Metro with package exports resolution (default since React Native 0.79).

[1.3.0] - 2026-08-04

Never published to npm on its own — it shipped as part of 1.4.0.

Added

  • morphicons/svelte — Svelte 5 binding. The same MorphIcon as React and Vue: uncontrolled (icon prop), controlled (from/to/progress) and imperative (bind:thismorphTo/set) modes, exact SSR first paint, accessibility defaults and lucide-svelte drop-in props. Ships as .svelte source compiled by the consumer's bundler via the svelte export condition; svelte >= 5 joins react and vue as an optional peer.
  • A documented lifecycle contract, shared by the three bindings (README → "Lifecycle contract"): lazy driver on iconless mounts (an icon that arrives late — async data, pure imperative use — births the driver on the spot, painting without animating; morphTo before the driver exists behaves as set), explicit mode precedence (controlled wins while from/to are both present; dropping the pair hands the path back to icon), and clean re-entry (leaving controlled mode invalidates the frozen pair, so returning to it renders exactly like a clean mount). Pinned by mirrored client-mount test suites in the three frameworks.

Fixed

  • Mounting any binding without an icon left the component dead forever — the imperative handle silently no-oped and late props were ignored. Covered by the lazy-driver contract above; affected React, Vue and Svelte alike.
  • Stale controlled state when switching modes: after an imperative set/morphTo (or an icon takeover), returning to the same from/to pair reused the previous plan without re-basing, producing geometry that differed from a clean mount at the same progress.
  • icon and from/to no longer compete when combined: an icon change used to fire a spring animation that overwrote the declared progress. In React, dropping the controlled pair also failed to apply the current icon.

Changed

  • Svelte's MorphIconProps now derives from svelte/elements' SVGAttributes instead of accepting any key: SVG attributes, events and ARIA are fully typed — typos like strokWidth fail the build, matching lucide-svelte and the React binding's SVGProps surface. (from/to shadow the SMIL attributes of the same name, as in React.)

1.2.0 - 2026-08-03

Added

  • morphicons/vue — Vue 3 binding. Same three modes as React (uncontrolled, controlled, imperative via template ref), exact SSR, accessibility defaults, lucide-vue-next drop-in props. Plain render function — no SFC compiler or JSX involved. Optional peer vue >= 3.3.

1.1.1 - 2026-08-01

Fixed

  • Block transport: icons that are congruent as a whole now stay rigid mid-flight — subpath centroids ride the shared similarity around the global centroid instead of lerping, so cross-subpath distances hold at every t, not only at the endpoints.

1.1.0 - 2026-08-01

Added

  • fitIcon — re-grid icon packs drawn off the 24×24 canvas (Carbon on 32, Teenyicons on 15, Heroicons solid on 20…) so they morph in the same coordinate space as Lucide/Tabler/Heroicons/Iconoir.

1.0.0 - 2026-08-01

First stable release.

Added

  • Universal morphing core (morphicons): parse → normalize → arc-length resampling with anchored corners → surjective subpath matching → closed-form Procrustes with minimal-rotation tie-break, circular correspondence for closed paths and global-hybrid block coherence → polar interpolation → serialization. Rotations emerge from the math — no hand-declared groups. Zero runtime dependencies, DOM-free.
  • DOM driver (morphicons/dom): createMorph with morphTo/set/seek/progress/destroy, spring physics with true interruptibility, a singleton rAF scheduler, canonical snap at rest and prefers-reduced-motion support.
  • React binding (morphicons/react): MorphIcon with uncontrolled/controlled/imperative modes, exact SSR first paint, accessibility defaults and lucide-react drop-in props.

Versions 0.1.0–0.1.1 were publishing-pipeline shakedowns, superseded by 1.0.0 the same day.

Source: README.md, updated 2026-08-06