Caleb Porzio‘s “Project X” recently got its official name: Alpine.js.
Alpine.js offers you the reactive and declarative nature of big frameworks like Vue or React at a much lower cost.
You get to keep your DOM, and sprinkle in behavior as you see fit.
It, like Vue which was one of its sources of inspirations, works by adding directives to your markup. Here’s a dropdown example:
<div x-data="{ open: false }">
<button @click="open = true">Open Dropdown</button>
<ul
x-show="open"
@click.away="open = false"
>
Dropdown Body
</ul>
</div>
Leave a comment