Mercury is an animation library designed specifically for Svelte, created to bring powerful, expressive motion into modern Svelte applications—without adding unnecessary complexity or breaking away from Svelte’s core principles.
Many existing animation solutions for Svelte either offer limited functionality, are deprecated or introduce awkward abstractions. Libraries like Framer Motion set a high bar for motion design in React, but adapting those patterns to Svelte often results in unexpected results and bloated code.
Mercury was built to solve this gap.
Mercury aims to bring layout-aware, fine-grained animations to Svelte in a way that feels native. It focuses on:
layoutId
s, making complex interactions feel effortless.The core philosophy behind Mercury is to enable expressive animation without compromising the clarity or structure of Svelte code. It builds upon Svelte’s strengths rather than abstracting them away, offering a motion system that is:
Mercury makes advanced animations accessible to Svelte developers—without introducing unnecessary overhead or breaking the mental model of how Svelte works.
See in-depth documentation and examples at this site
Check some examples of how to use Mercury
npm install @omicrxn/mercury
pnpm install @omicrxn/mercury
yarn install @omicrxn/mercury
Mercury is built on the shoulders of giants. Special thanks to the creators and maintainers of Svelte, Anime.js, Motion and GSAP and special thanks to @Char2sGu for helping me integrate layout projections into the library.
MIT License