Hacker News new | ask | show | jobs
by brushfoot 804 days ago
Alpine isn't really comparable to HTMX, though their names often come up together.

Alpine is something like "AngularJS lite," a lightweight JavaScript framework with some similarities to the original version of Angular.

HTMX is a collection of HTML attributes that simplify replacing HTML on your page with HTML partials from your server.

In the article's example of interdependent dropdowns, you'd have HTMX attributes for catching the change event of the first select, specifying the server URL to fetch updated HTML from, and specifying the target to put the HTML into (the second select).

Some have recommended using HTMX for less complicated client-side interactivity and adding AlpineJS to pages that need more. That said, people have built impressive apps just by leveraging HTMX.