TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

AlpineJS – Lightweight JavaScript Framework

77 pointsby tmleealmost 4 years ago

10 comments

Kovahalmost 4 years ago
I first thought that I would never use Alpine, but now it is part of almost all new projects. "Putting JS into the HTML" seemed so obviously wrong for me first, but it's absolutely enough for 90% of micro interactions like dropdowns, navigations, toggles or whatever you would put into a 10-line JS file otherwise. Of course, it is NOT a replacement for React or other big frontend frameworks.
评论 #27723632 未加载
评论 #27723870 未加载
vincentsaulysalmost 4 years ago
Surprised nobody has brought up htmx [0], which is very similar but the syntax is cleaner (imo of course).<p>[0]: <a href="https:&#x2F;&#x2F;htmx.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;htmx.org&#x2F;</a>
评论 #27723574 未加载
评论 #27723071 未加载
dangalmost 4 years ago
Recent thread:<p><i>AlpineJS</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27470397" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27470397</a> - June 2021 (37 comments)<p>Also related:<p><i>AlpineJS Guides and Examples</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24513044" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24513044</a> - Sept 2020 (14 comments)<p><i>Alpine.js: A minimal framework for composing JavaScript behavior in your markup</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22281975" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22281975</a> - Feb 2020 (47 comments)
ahmedfromtunisalmost 4 years ago
Why is there no information on the README about what functionality does this framework offer, or why I might be interested in using it? Isn&#x27;t this supposed to be the first piece of information a potential user should be interested in before getting into the how?
评论 #27722728 未加载
评论 #27722887 未加载
评论 #27723235 未加载
gherkinnnalmost 4 years ago
The whole “16 attributes, 6 properties, 2 methods” thing is very approachable. Excellent docs.<p>I work on a few projects that only have simple interactions, no build step, and currently written in vanilla. It’s simple, but fussy. Imperatively building UI things is a nightmare. You get tired of it all and start building your own framework. Kinda silly.<p>Alpine might just be the solution. And I bet the size will be about the same.
AirMax98almost 4 years ago
The for loop syntax was a bit of a turnoff, but the “cloak” functionality has me wanting to try this on my next small project.
skcalmost 4 years ago
Every AlpineJS article I read has the disclaimer that this framework isn&#x27;t meant for large applications without ever defining what that actually means.
评论 #27723412 未加载
trueanddirectalmost 4 years ago
Another day, another lightweight JavaScript framework which will inevitably become bloated it gains any traction at all.<p>Next.
TheLuddalmost 4 years ago
I can&#x27;t take a project described as a &quot;JavaScript framework&quot; serious these days. A framework for _what_? Many things are done with JS nowadays.
评论 #27722191 未加载
flowerladalmost 4 years ago
This looks bad. I see custom syntax, and JavaScript embedded into HTML in a way that cannot be syntax-checked at build time.<p>If you want a lightweight framework check out UIBuilder instead: <a href="https:&#x2F;&#x2F;github.com&#x2F;wisercoder&#x2F;uibuilder" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;wisercoder&#x2F;uibuilder</a><p>Same JSX syntax as React, but this lib is very simple -- just over 200 lines of source code.
评论 #27722354 未加载
评论 #27722746 未加载