Builderoom
Use tool

A spring-physics-based SVG icon morphing library with zero dependencies, supporting React, Vue, Svelte, and more.

MIT
1 / 2

Product facts

Type
Web App / SaaS
Category
Development & Engineering › Frontend and UI Libraries
Pricing
Open source
License
MIT
Launched
Nov 24, 2026
Listed
Nov 24, 2026

Overview

XGitHub

morphicons is an SVG icon morphing library created by developer Guillermo and open-sourced under the MIT license. It smoothly transforms any SVG icon into another, making it ideal for UI icon state transitions.

Core Principles

morphicons uses closed-form math to calculate rotation, scale, and translation, mapping the source icon to the target icon. Matching shapes rotate directly, while filled icons morph as filled shapes. Animations are based on a spring physics model, offering styles like smooth, snappy, and bouncy, with adjustable speed and stroke width.

Compatibility & Integration

The library treats icons as data (such as the d attribute or Lucide's IconNode format) rather than components, so no extra configuration is needed for specific icon libraries. Supported frameworks include:

  • React
  • Vue
  • Svelte
  • React Native
  • Astro
  • Vanilla JS

In your code, simply pass two icon data sets to the <MorphIcon> component to toggle between them—no wrapper, key, or other configuration required.

Supported Icon Sets

morphicons supports icons of different grid sizes via the fitIcon method, compatible with both stroked and filled styles. Verified icon sets include Lucide, Tabler, Heroicons, Iconoir, Material Symbols, Phosphor, Hugeicons, and the shadcn registry.

Technical Specs

  • Approximately 10 KB gzipped, including framework bindings
  • 0 runtime dependencies
  • 5 framework bindings plus vanilla JS support
  • All on-screen icons share a single requestAnimationFrame (rAF) loop

Key features

  • Spring Physics Animation: Morphs icons using a spring physics model with adjustable smooth, snappy, and bouncy styles plus speed control.
  • Closed-Form Math: Automatically calculates rotation, scale, and translation parameters—no manual morph path configuration needed.
  • Zero Runtime Dependencies: No runtime dependencies at all, approximately 10 KB gzipped.
  • Multi-Framework Support: Provides bindings for React, Vue, Svelte, React Native, and Astro, plus vanilla JS support.
  • Cross-Set Morphing: Morphs icons across different icon libraries and grid sizes.
  • Stroke & Fill Compatible: Supports morphing for both stroked and filled icon styles.
  • Data-Driven: Icons are passed as data formats like the d attribute or IconNode, not as components.
  • Shared rAF Loop: All icons on the page share a single requestAnimationFrame loop.
  • fitIcon Adaptation: Handles grid adaptation for any icon set via the fitIcon method.

Releases

Notify me

Initial · morphicons

Q&A

Which frontend frameworks does morphicons support?AI-generated
It supports React, Vue, Svelte, React Native, and Astro, as well as vanilla JS.
Does morphicons have any runtime dependencies?AI-generated
No. The official documentation states there are 0 runtime dependencies.
Can I morph icons from different icon libraries into each other?AI-generated
Yes. morphicons supports morphing across icon libraries, grids, and from stroked to filled styles.
How large is morphicons?AI-generated
Including framework bindings, it is approximately 10 KB gzipped.
How do I pass icon data?AI-generated
Icons are passed as data, such as the SVG d attribute or Lucide's IconNode format, rather than as components.
What license does morphicons use?AI-generated
MIT license.
More
Use tool
Bookmark

This product has no owner yet

It was listed by the platform or its author left. If it is your work, prove your relationship to become the owner.

Claim this product

Alternatives

The product content on this page was translated by AI from the author's original.