DEV Community

Cover image for ๐ŸŽจ svggles โ€“ Make Interactive SVG Illustrations in React (with 1 Line)
Shanting Hou
Shanting Hou

Posted on

๐ŸŽจ svggles โ€“ Make Interactive SVG Illustrations in React (with 1 Line)

Iโ€™ve always loved how p5.js made it super easy to create fun, playful interactions in code. You can make something come alive with just a few lines โ€” cursor-following eyes, floating shapes, reactive visuals. It felt like sketching with code.

But when I switched gears to frontend development (especially in React), I realized something was missing...

I wanted to bring that creative energy into my everyday UI work.

Thatโ€™s why I built svggles โ€” a small React utility that makes it easy to add interactive SVG illustrations to your projects. Think of it as a fun toolkit for adding โ€œjust a little magicโ€ to your frontend.

svggles logo

What is svggles?

svggles (published as interactive-illustrations) is a React package that lets you create SVG-based components that respond to Mouse movement, Scroll, Hover, and custom animations or transformations

Itโ€™s lightweight, customizable, and designed to work seamlessly with modern React apps.

How to install:

npm install interactive-illustrations

Playground & Docs

๐ŸŒ Website & Examples
๐Ÿ“ฆ NPM package
๐Ÿ’ป GitHub repo

If youโ€™ve ever wanted to build a UI that comes alive โ€” try svggles. Let me know what you think, share what you build, and feel free to open a PR with your own ideas!

Top comments (0)