mrkeyoor.comAsk

alpinejs/alpinetested 23 Oct 2026commit 8d3d9a2

alpine review

Our Alpine.js install passed in 27 seconds and build passed in 6 seconds at commit 8d3d9a2, associated with v3.17.5 on the release page.

  • Safety failed
  • Build 6 s
27 sto install
  • Tests failed
  • 613 packages
Webevaluationupdated 28 Nov 2026
+10stars / 7d

Alpine.js adds reactive state and event handling to HTML. Its state documentation distinguishes local component data from stores available across a page.

Verdict

Our Alpine.js install passed in 27 seconds and build passed in 6 seconds at commit 8d3d9a2, associated with v3.17.5 on the release page. Tests stopped after 4 seconds because Cypress could not find Xvfb. Use Alpine for local reactive behavior in existing HTML. Choose another approach when reusable frontend components are the main organizing requirement; Watson favors Vue for larger projects with that need.

Alpine infographic: adds reactive state and event handling to HTML, plus its uses, our test result, pitfalls and who it suits
Tested 23 October 2026: the source install took 27 s and the build 6 s.

We ran it

Lab card: what happened when we ran alpine
Lab card from our sandbox run
Screenshot of alpine (alpinejs.dev)
alpinejs.dev
Install✓ · 27s613 packages · 166 MB
Build✓ · 6s
Tests✗ · 4sran, no count parsed
Known vulns00 critical · 0 high · 0 moderate · 0 low (npm audit)
Repo310 files~29,924 lines of source · 5.8 MB · 3 CI workflows · tests dir

Answers from our run

Does alpine build from source?

Dependencies installed in 27 seconds (613 packages), and the build succeeded in 6 seconds. We cloned commit 8d3d9a2 into a clean Debian container with 3 CPUs and no project-specific setup.

Do alpine's tests pass?

No. The project's own test command exited unsuccessfully after 4 seconds, and its output did not expose an individual test count.

Does alpine have known vulnerabilities in its dependencies?

npm audit found none in the dependency tree at the time of our run.

Who should not use alpine?

Teams whose main requirement is a larger frontend organized around reusable components: Watson favors Vue for that job.

What are the alternatives to alpine?

Vue, React. Our Alpine.

Setup3/5Our source checkout installed in 27 s and built in 6 s, a heavy install of 613 dependencies, and we did not run a README task.Editor’s note: Installation and build completed, but Cypress stopped at missing Xvfb and the November Compose prerequisite failed.
Docs3/5The README has an install section (“Quickstart”) and usage in the same section, but the usage section is thin: no code and under 400 characters.Editor’s note: Installation, state and loop guides support specific answers; complete documentation usability has no recorded evaluation.
Community5/5Last push on 2026-11-04, 32,041 stars and maintainers answered or closed 10 of the 10 most-discussed issues we sampled.Editor’s note: Named issue discussions document workarounds, but the evidence does not measure support capacity or response times.
Maturity4/5Latest release v3.17.5 on 2026-10-20, repository created 2019-11-28 and its test suite did not pass in our sandbox.Editor’s note: The source build completed and release history is readable; production reliability has no recorded evaluation.

How we score

Discussed on

  1. hnAlpine.js369 points
  2. hnSuper small Docker image based on Alpine Linux261 points
  3. hnAlpine.js: A minimal framework for composing JavaScript behavior in your markup148 points
  4. hnShow HN: Build progressively enhanced reactive HTML apps using Go and Alpine.js127 points
  5. hnAlpine.js Magic Helpers Library105 points

Who it’s for

Developers adding local reactive behavior to existing HTML.
Solo developers building small personal or household interfaces like Blake Watson's examples.
Teams choosing explicitly between component data, a shared store and custom events.

Who it’s NOT for

Teams whose main requirement is a larger frontend organized around reusable components: Watson favors Vue for that job.
Developers choosing Alpine solely because type definitions exist: issue #2199 describes IntelliSense friction after adding component types.
Projects relying on the historical custom IE11 branch: its reporter lists broken functionality.

Setup reality

Our October 23 run at commit 8d3d9a2 installed in 27 seconds, recorded 613 dependencies and 166 MB on disk, and built in 6 seconds. Tests exited 1 after 4 seconds because Cypress 15.18.0 could not spawn Xvfb. npm audit reported 0 known vulnerabilities. The release page associates 8d3d9a2 with v3.17.5.

The installation guide documents a deferred script tag or an npm module initialized with Alpine.start(). The contributor README separately describes the npm workspace, build command, Cypress integration tests and Vitest unit tests.

The sandbox configuration recorded 3 CPUs, 8 GB RAM and image label lab-node:22. The test log identifies Debian GNU/Linux 12. The November 28 procedure failed its Compose prerequisite because the required file was absent; teardown completed.

Our Alpine.js build passed in 6 seconds, and Cypress stopped after 4 seconds because Xvfb was missing. Use Alpine for local reactive behavior in existing HTML when its state and bindings stay understandable. Choose another approach when your main requirement is a larger frontend organized around reusable components: Blake Watson's comparison favors Vue for that work. The release page associates tested commit 8d3d9a2 with v3.17.5, connecting the source run to an exact release.

What people use alpine for

Blake Watson describes using Alpine mostly for small solo applications, including personal and household projects. His examples include fetching a Mastodon post on request and building a minimal task list. These examples give the adoption decision a concrete starting point: a requested update, a list of local data, or a small interface maintained by one developer. The issue discussions add more demanding cases involving nested repeaters and an application view embedded elsewhere.

Person and task What actually happened What you can take from it
Blake Watson, personal and household apps He describes small solo projects as his usual Alpine context. Watson's account explains his preference for this workflow.
Blake Watson, Mastodon preview His example requests an individual post and displays its content. The preview combines a request with a local interface update.
Blake Watson, task list His 20-line demonstration adds tasks and marks them done, without editing or deletion. The task-list demonstration has a deliberately small feature set.
alessandrotesoro, nested repeater form The developer encountered the nested-loop problem while building repeated form fields. Issue #158 describes the form requirement.
lindsaykwardell, embeddable application view The view needed to match records across two lists. Issue #158 also describes the embedded-view requirement.

Watson's preview gives a useful model for an existing page: a visitor requests more information, a request retrieves it, and part of the page changes. The nested-form and embedded-view reports introduce a different maintenance question. A small area of the screen can still contain relationships between lists or components. Choose an evaluation example that includes those relationships if they are part of the application you intend to build.

What happened when we ran it

Our October 23 source run installed in 27 seconds and built in 6 seconds at commit 8d3d9a2. The recorded test command exited 1 after 4 seconds, with Cypress 15.18.0 reporting that Xvfb was missing and ending with Error: spawn Xvfb ENOENT. Installation and compilation therefore completed before the browser-test startup failed. The contributor environment recorded 613 dependencies and 166 MB on disk, alongside a 5.8 MB checkout.

October source-run step Recorded result Meaning for your decision
Install Succeeded in 27 seconds; 613 dependencies; 166 MB installed These figures describe the contributor environment.
Build Succeeded in 6 seconds The recorded build command completed.
Tests Exit 1 after 4 seconds Cypress 15.18.0 reported missing Xvfb and Error: spawn Xvfb ENOENT.
npm audit 0 known vulnerabilities: 0 critical, 0 high, 0 moderate, 0 low These are the October dependency-scan results.
Repository scan 310 files, about 29,924 source lines, 5.8 MB checkout These figures describe the source workspace.
Tooling signals 3 CI workflow files, tests directory, npm workspaces, no Dockerfile The scan detected these files and structures.

The October sandbox configuration specified 3 CPUs, 8 GB RAM and image label lab-node:22. The failing test tail identifies linux-x64, Debian GNU/Linux 12 and Cypress 15.18.0. Its instruction is explicit: install Xvfb and run Cypress again. The contributor README distinguishes Cypress integration tests from Vitest unit tests, with separate directories and commands for each tool. Those distinctions keep the startup error tied to the command that produced it.

The November 28 safety step failed because no required Compose file existed. Its exact error was unsafe repo: none of compose.yaml, compose.yml, docker-compose.yaml, docker-compose.yml exists. The run summary describes deployment with Docker Compose and ports bound to 127.0.0.1, but the step log records a failed deployment prerequisite. The teardown record says teardown completed. The concrete outcome is a failed prerequisite followed by successful teardown.

Where people get stuck: state crosses component boundaries

Use Alpine.store for page-wide reactive data; the historical table-to-modal discussion suggests dispatching fetched details after the request resolves. This separates two decisions: which components need to read the same data, and which component needs notification that a request has finished. In issue #254, the original shared-object example failed to update both components reactively. The later modal discussion proposed an event carrying the resolved information.

Historical report Response or workaround in the discussion How to use the report
#49: nested component could not read outer scope Contributors discussed parent-access designs and prototypes. Compare the v1.2.0 example with the current nesting documentation.
#158: nested loops needed outer-loop data Contributors identified missing loop variables and proposed a PR. Include repeated groups and related lists in the evaluation example.
#270: class-instance reactivity changed The reporter switched to objects after discussion of the v2.1 engine change. Record class-instance behavior for the version you choose.
#374: overlapping class groups removed red Reordering conditions helped the reporter's simple example; contributors proposed separating removals and additions. Include transitions between overlapping class conditions.
#401: input binding threw InvalidStateError Contributors proposed checking selectionStart and restoring selection endpoints and direction. Include different input types and programmatic model changes.

The current state guide documents parent-data access from a nested component, with a matching child property taking precedence. For components elsewhere on the page, it documents a global store. These are different relationships, even when both involve more than one component. Start by drawing the ownership of the data: nested inheritance, page-wide data, or a request result sent to a modal. That choice determines which documented mechanism addresses the interaction.

Alpine.data moves reusable behavior into JavaScript

Alpine.data registers the reusable data portion of a component, according to the state guide. The guide demonstrates a named dropdown definition with an open value and a toggle method, then uses that definition in multiple HTML blocks. It first recommends extracting the entire HTML block into a backend template partial when working in a framework such as Rails or Laravel. Reusing behavior and reusing markup are separate operations in that explanation.

Watson describes Alpine.data as a way to define component behavior in JavaScript rather than inline HTML. His maintenance concern is substantial JavaScript accumulating inside attributes. A useful division follows the documentation: keep the bindings where the elements are declared, and give substantial operations names in the registered behavior. For a dropdown repeated across server-rendered pages, the template partial handles the markup while Alpine.data supplies the reusable data and methods.

Security policy affects the build choice

The repository README lists a CSP package, and Watson describes a CSP-friendly build that avoids unsafe-eval. CSP means Content Security Policy, the browser rules a site sets for loading and executing content. His review distinguishes that build choice from Alpine.data, which moves behavior into JavaScript. Those address different decisions: expression execution under a browser policy and the organization of component behavior.

The historical security-awareness discussion in issue #237 questions executable expressions in attributes and asks for clearer documentation. Participants also debate the attack scenario's assumption that another script can already be injected. Keep that attribution intact when assessing the discussion. Our October npm audit recorded 0 known vulnerabilities across critical, high, moderate and low severity levels; that number belongs to the dependency scan described in the run table.

TypeScript and responsive menus have specific failure cases

Issue #2199 describes IntelliSense stopping after a developer added a component type while using @types/alpinejs. The report names VS Code, component methods and injected properties such as $watch and $store. Later discussion considers explicit method declarations, store casts and generic overloads. A useful editor evaluation therefore includes calling component methods, inspecting their arguments and accessing the store, rather than stopping when the type package installs.

In issue #235, iksaku describes a small-screen visibility implementation, while georgeboot discusses the opposite pattern: hiding on small screens and toggling on larger ones. The discussion recommends keeping display classes outside transition steps and using transition steps for animation or transforms. It also contains a corrected claim about class precedence. Build the responsive example around both visibility directions, with opening, closing and breakpoint changes included in the same interaction.

Alpine vs Vue, React, Reef and plain JavaScript

Watson favors Alpine for quick personal interfaces and Vue for larger projects needing reusable frontend components. His comparison also says Vue can start from a CDN script. The decision therefore extends beyond whether a library can begin with a script tag. Consider how the interface will be organized after it gains more behavior, how much markup is reused, and whether components or existing HTML are the natural unit of maintenance.

Alternative What the comparison supports Choose it when
Vue Watson favors it for larger projects needing reusable frontend components. Reusable frontend components are central to the application.
Plain JavaScript Watson recommends considering a few lines of JavaScript for an isolated interaction. The interaction is small enough to maintain directly.
React Its README describes encapsulated components composed into complex interfaces. Component logic in JavaScript matches the intended application structure.
Reef Watson describes a reactive library without a build step. You want to compare another small reactive approach.

React's README also describes gradual adoption and adding React to an existing project. That makes an all-or-nothing rewrite a poor premise for this comparison. Watson's preference reflects his small-project workflow; React's own description explains its component model. Use those sources for the choices they actually describe. Alpine's documentation adds another useful distinction through template partials, Alpine.data and Alpine.store: markup reuse, behavior reuse and shared state each have their own mechanism.

Alpine.js is the project at alpinejs/alpine

Alpine.js is the JavaScript project at alpinejs/alpine, distributed as the alpinejs npm package in its installation guide. It is distinct from Alpine Linux and unrelated brands mixed into the autocomplete results. Those search results explain the naming ambiguity; the software decision here concerns HTML state and interface behavior. Use the full name Alpine.js when looking for its installation instructions or frontend comparisons.

The release page lists v3.17.5 with commit 8d3d9a2, the commit used in our October 23 source run. Its release note names a morph change: do not reapply x-cloak to rendered elements. The earlier v3.17.1 entry identifies commit 8579eab, so those release entries also distinguish the older published review's version from this run. The exact commit is the useful anchor when comparing setup results or tracing a release note.

FAQ

Watson favors Alpine for quick personal interfaces and Vue for larger projects needing reusable frontend components. His review also describes starting Vue from a CDN script, so installation style alone does not decide between them. The questions below address that choice and the concrete state, typing and form problems developers raised. Current documentation supplies the nesting, store and index answers; named issue reports supply the historical examples.

Why choose Alpine.js instead of Vue?

Watson prefers Alpine for quickly building his small solo interfaces and Vue for larger projects needing reusable frontend components. His comparison describes a workflow preference. Apply it to the interface you expect to maintain: local behavior on existing HTML, or a frontend organized around reusable components. Both libraries can begin through a CDN script in his account.

How can a nested Alpine component access its parent's state?

A nested component can access parent data, and a matching child property takes precedence, according to the state guide. Its example places a label in the child and reads an open value from the parent. Issue #49 concerns a v1.2.0 example and parent-access proposals; the current guide is the direct reference for the documented nesting rule.

How can separate Alpine components share reactive state?

Alpine.store makes data available across the page, according to the state guide. The example registers a tabs store and accesses or changes it from separate HTML blocks. Issue #254 discusses another relationship, sending fetched details to a modal with a custom event. Use the store answer for shared data and the event discussion for that notification sequence.

How do nested x-for loops access the outer loop's item?

Issue #158 identifies missing extra loop variables in the historical implementation and discusses a proposed PR. The thread includes nested repeater forms and an embedded view matching two lists. Those requirements explain why a single flat list is an incomplete evaluation example for these users. Keep the outer item and the related inner records in the same acceptance case.

How can I access an index inside an x-for loop?

The x-for guide demonstrates (color, index) in colors. It requires x-for on a template element containing one root element, and recommends unique keys when items will be reordered. These rules belong together when adapting the example: declare the parent data, put the loop on the template, and keep the repeated content under one root.

Can I initialize x-data with an ES6 class instance?

Issue #270 reports a class-instance example working with v2.0.0 and losing reactivity after an upgrade to v2.1.2. The discussion connects the change to the v2.1 reactivity engine and recommends objects; the reporter followed that workaround. The useful historical detail is the version transition, rather than the initial comment that class instances should have few differences from plain objects.

Can Alpine run in IE11, and what functionality would be missing?

keyurshah reported limited IE11 use through a custom historical branch. Their status update lists broken transitions, incomplete multiple-value inputs and failing x-if templates. The transition error was Error: (Argument not optional) - utils.js - line 157. The same update says x-ref and $refs were working, distinguishing recovered behavior from the remaining failures in that branch.

Why does x-bind:class remove a class that another condition enables?

In issue #374, two class groups included red, and the false condition removed it from the reporter's button. Reversing the conditions produced the intended colors in that simple example. The discussion proposed handling removals and additions separately. The report gives a concrete case to preserve when exercising overlapping class groups and changing the state that controls them.

Why did input binding start throwing InvalidStateError after upgrading to v2.3.0?

Issue #401 reports selection handling applied to input types that do not support it after an upgrade to v2.3.0. The report includes Firefox's InvalidStateError and a number-input selection error. Follow-up discussion proposes checking selectionStart against null and restoring selection endpoints and direction. It also describes highlighted text being lost after a programmatic model update, making selection preservation another concrete regression case.

How do I get TypeScript checking and IntelliSense for Alpine.data, Alpine.store and magic properties?

Issue #2199 discusses @types/alpinejs and reports lost component IntelliSense after adding a type hint. The developer's example concerns a method whose arguments the editor previously recognized. Later comments suggest explicitly declaring component methods. Evaluate that combination of method arguments, store access and injected properties in the editor your team uses; installing definitions is only the first operation in that workflow.

Can Alpine.store accept a generic type for my store?

Participants in issue #2199 discuss a missing store generic, a proposed overload and a cast to a store interface. The typings contributor explains a DefinitelyTyped lint restriction behind removing the generic. These comments document the typing setup under discussion. They also identify a precise editor task for evaluation: retrieving a store and inspecting whether its expected fields retain their types.

How can I use transitions on elements that only appear at certain responsive breakpoints?

Issue #235 recommends keeping display classes on the element and animation or transform classes in transition steps. The discussion covers a small-screen example and trouble with the reverse visibility pattern. Use both patterns in the responsive menu example, including opening and closing before crossing the breakpoint. The class-precedence claim corrected within the conversation should not become a general CSS rule in setup notes.

What we have not tested yet

The October command stopped at Cypress startup after 4 seconds, and the November procedure stopped at its missing Compose prerequisite. There is no completed browser assertion count, Xvfb rerun or complete interactive application result in these records. The image label lab-node:22 does not establish the actual Node version. The contradictory November deployment summary also leaves no supported basis for claiming a running Compose application, despite its statement about loopback-bound ports.

Our run measured installation, build, test-command startup, disk usage and an npm audit. It did not measure browser bundle size, runtime speed, accessibility, SEO effects or behavior under large lists and frequent updates. Watson's size estimate is his estimate. The video records contain no usable Alpine.js transcript, and the Bilibili results concern other Alpine entities. These materials add no demonstrated Alpine.js workflow to the written examples discussed above.

The CSP build has no enforced-policy result here, and the historical security discussion has no complete mapping to the current implementation. The class-instance, nested-loop, class-binding, input-selection, responsive-transition, typing and IE11 reports establish historical concerns and proposed workarounds, rather than present-day compatibility or release inclusion. The state and index guidance comes from documentation, not browser execution. No corrected example in this review represents a new test.

The next useful evaluation is the actual repeated form or table-to-modal interaction the application needs. Record the Alpine version, shared-state mechanism, browser, policy and editor behavior alongside the result. Include a failed asynchronous request and both responsive visibility patterns. That exercise would address the maintenance decision with the application's own requirements, while the existing measurements remain the October source run and the November deployment-prerequisite failure.

Alternatives

ProjectWhat it isPick it when
Vue gh↗Watson favors Vue for larger projects needing reusable frontend components.Choose Vue when reusable frontend components are central to the application, following Watson's comparison.
React gh↗React's README describes encapsulated components composed into complex interfaces.Choose React when component logic in JavaScript matches the application's intended structure.

What people are saying

  1. [hackernews] OpenSSH 10.6p2 Critical workaround for alpine without PAM
  2. [hackernews] Alpine Linux Security advisory: OpenSSH-server password authentication bypass

Sources

  1. Alpine repository and contributor README
  2. Alpine installation
  3. Blake Watson: Alpine.js for home-cooked apps
  4. Alpine state documentation
  5. Alpine x-for documentation
  6. React README
  7. Alpine releases

More web reviews