MorphUI
React component library where triggers morph into dialogs, cards and panels with GSAP Flip. Published on npm.
What actually changed.
The challenge
A trigger and the panel it opens live in different parts of the DOM. Moving one into the other without a jump meant measuring both, inverting the panel onto the trigger and replaying that geometry as an animation.
The approach
Each component wraps the caller's own element, measures the trigger and runs a GSAP Flip transition. GSAP stays a peer dependency so plugins registered on the host's instance remain visible. Styles ship as CSS with seven themes, including the achromatic Ink default.
The outcome
Published as @lestradavaz/morph-ui on npm with 20 components, a documentation site and an MIT license.
Why GSAP is a peer dependency
Two copies of GSAP in one app mean plugins registered on one instance are invisible to the other. MorphUI uses the host's instance.
Documentation and tests
The docs site covers every component and theme, and Playwright tests check the motion and the documentation pages.