“The best alternative to other JS frameworks: light and powerful, and the backend to Livewire (also used in this project).”
Frontend FrameworkMaker says so · source ↗
Alpine.js
Minimal JavaScript framework for adding reactive behavior, like toggles, dropdowns and form bindings, directly in HTML attributes.
Alpine.js is a small JavaScript framework for the interactive bits of a page that is otherwise rendered on the server: menus, modals, tabs, form fields that react to each other. It describes itself as a tool for composing behavior directly in your markup, in the spirit of jQuery for the modern web.
How it works: an x-data attribute declares a reactive state object for an element and its children. Other directives read and change that state: x-on (or @) listens for events, x-show hides and shows elements, x-text and x-bind write values into the page, x-model binds form inputs, and x-for repeats elements. When the state changes, the bound parts of the page update.
What you get: a library you add with one deferred script tag, or install from npm as alpinejs and start with Alpine.start(). Magic properties such as $refs, $watch and $store cover element references, watchers and global state shared across components, and official plugins add input masks, intersection and resize observers, focus trapping, collapse, anchoring, morphing, sorting and localStorage persistence.
The limits: Alpine adds behavior to HTML that already exists; its directives, magics and plugins don't include routing or a data-fetching layer, so page structure comes from your server or another tool. Expressions live inside HTML attributes, and evaluating them needs unsafe-eval under a Content Security Policy; the separate CSP build avoids that but forbids arrow functions, template literals, globals like window and several other JavaScript features in those expressions.
Where it fits
Who uses it
1 makers' products, each linked to the source that shows it, and 13 open-source projects that declare it in their code.
Open source: a project that declares Alpine.js as a dependency in its public code — verifiable, but not necessarily a live product.
What makers say
1 makers on why they use Alpine.js, in their own words on Product Hunt.
The best alternative to other JS frameworks: light and powerful, and the backend to Livewire (also used in this project).
Infinite ConvoSep 2026 ↗Alternatives to Alpine.js
All alternatives by situation →Questions makers ask about Alpine.js
Do I need a build step?
No. Include it with a defer script tag from a CDN, or install the alpinejs npm package, import it and call Alpine.start() once per page. source ↗
How do separate components share state?
Through Alpine.store(), which registers reactive global state that markup reads and changes via the $store magic property. source ↗
Does it work with a strict Content Security Policy?
Use the separate @alpinejs/csp build. It avoids unsafe-eval but restricts expressions in attributes, ruling out arrow functions, template literals, the spread operator and access to globals like window or console. source ↗
Can it remember state across page loads?
Yes, with the official Persist plugin, which saves the value to localStorage by default whenever it changes. source ↗
Does it work alongside htmx?
Yes. The htmx docs name Alpine.js as one of the recommended ways to add client-side scripting to an htmx app. source ↗
Is Alpine.js free?
Yes — it is free, open-source software.
Is Alpine.js open source or self-hostable?
Open source, and you can self-host it. source ↗
Can AI coding agents work with Alpine.js?
No llms.txt, official MCP server or CLI found yet.
Who uses Alpine.js?
1 makers' products we track, each with a source, and 13 open-source projects declare it in their code. source ↗