alpinejs/alpine ? reverse-engineered prompt

Reverse engineered prompt

Build me a lightweight JavaScript framework for adding behavior directly in HTML, something simple enough that I can drop a script tag on a page and start using it right away.

I want the core to support small interactive components like showing and hiding things, toggling state, reacting to clicks and input, looping through lists, and updating text or classes from data in the markup. It should feel easy to use in plain pages, with a clean way to write little bits of state and behavior without a big app setup.

If it makes sense, include a few small extras too, like smooth expand and collapse, focus handling, preserving state between page loads, input masking, reacting when elements scroll into view, and morphing existing HTML smoothly. Make sure it works in a browser with a simple CDN build and also as an importable module. Add basic tests and a couple of example pages so I can see how it’s supposed to be used. If you need current implementation details, look up the latest docs online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab