Alpine.js – A rugged, minimal framework for composing JavaScript behavior in your markup.

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>

Alpine.js →

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.