Alloy CSS Runs Menus and Tabs Without JavaScript, but Dialogs Need Safari 26.2
Software / explainer
Alloy CSS Runs Menus and Tabs Without JavaScript, but Dialogs Need Safari 26.2
The 24 KB MIT stylesheet leans on popover and invoker commands, so its no-script promise has browser floors that differ by component.
Alloy CSS, an MIT-licensed stylesheet of about 24 KB gzipped, builds dialogs, menus, drawers, tabs, tooltips and toasts that work with JavaScript turned off. The catch is in its own README: dialogs need Safari 26.2, while the rest of the library runs on Safari 17.5.
The project drew 133 points on Hacker News on November 17, 2026. Its demo footer says "This page is one HTML file with Alloy CSS and no JavaScript."
What the README says Alloy is built on
The README names the foundations: "popover, :has(), color-mix() and light-dark()." Dialog buttons use the command and commandfor attributes. The repository belongs to the alloyhtml organisation and names no individual author. It showed 33 stars and 1 fork when read, and the CDN line pins @alloyhtml/css@1.
The pieces are browser features rather than code the library ships. That is why the file stays small, and why the support table matters more than the star count.
Which browsers each part needs
The README gives two floors. General support starts at Chrome and Edge 123, Firefox 125 and Safari 17.5. Dialogs raise that to Chrome and Edge 135, Firefox 144 and Safari 26.2.
Click-outside closing through closedby="any" needs Safari 27.3 or newer. Esc and close buttons work in all browsers, according to the README.
| Part | Chrome / Edge | Firefox | Safari |
|---|---|---|---|
| Most components | 123 | 125 | 17.5 |
| Dialogs | 135 | 144 | 26.2 |
| Click-outside close | not stated | not stated | 27.3 |
Why the dialog floor is higher
Mozilla's documentation puts the Popover API at Baseline 2025, newly available since January 2025. The Invoker Commands API, which supplies command and commandfor, reached the same status only in December 2025.
That ordering explains the table. Menus and tooltips ride on popover. Dialogs wait on invoker commands, whose built-in commands include show-modal and close on a <dialog>. MDN notes that built-in commands work before JavaScript downloads and runs, which is the property Alloy sells.
What else is in the package
Beyond components, the README lists utilities, spacing, sizes, breakpoints and two dark themes named dark and midnight. Colour handling uses color-mix() and light-dark(), which is why themes need no script either.
One caveat is spelled out for <summary> elements. A summary that draws its own icon "loses the browser's marker," so a custom disclosure triangle replaces the native one rather than sitting beside it.
How the declarative pattern looks in plain HTML
MDN's own example shows the mechanism Alloy wraps. A button with commandfor="mydialog" and command="show-modal" opens a <dialog> with that id, and a second button inside it with command="close" shuts it. No event listener is involved.
Popovers work the same way with toggle-popover and hide-popover. Custom commands whose names start with -- do need JavaScript, handled through the command event. That boundary is where a no-script library stops and application code begins.
What a team would check before adopting it
The honest reading is narrower than "no JavaScript needed." A site that must serve a Safari older than 26.2 gets menus and tabs but not working dialogs from this library, so it needs its own fallback.
Three checks follow from the README. Look at your analytics for Safari versions below 26.2. Decide whether click-outside closing matters, since it needs 27.3. And note that the project has no named maintainer and 33 stars, which says little about long-term upkeep.
The project's demo page is its own evidence: one HTML file, no script. For another small tool that keeps work in the browser, see the EditSQLite writeup.
How much attention it has
The Hacker News submission scored 133 points with 22 comments, and the demo page is the project's pitch. The repository's 33 stars and single fork are small beside that, and stars are not adoption.
Nobody outside the project has published compatibility testing that this report found, so every browser number above is the maintainers' own claim. The two MDN Baseline dates are independent. Another small developer tool the site has covered is Lend, an SSH agent proxy for coding agents.
The next thing to check is the README's Safari 27.3 line for click-outside closing, which is the highest floor it lists.
Sources
More in Software
- 01Zigzag, a 35 MB Mac Browser, Courts Arc Users 35 Days Before ShutdownThe WebKit-based browser imports Arc spaces and pinned tabs, but its README lists no sync, no Boosts and a partial Chrome extension API.
- 02Nimony 0.6.2 Sets a Year-End Goal for Nim 3 With 44 Days LeftThe compiler that will become Nim 3 is MIT-licensed and builds natively without LLVM, but its FAQ says it cannot yet compile Nim 2 code unchanged.
- 03Windows 11 Telemetry Flags Which Coding Agents You Run, Researcher FindsXusheng Li traced a service-experiment feature in build 26200.9974 that matches executable names such as claude.exe and queues the result as optional diagnostic data.
- 04NVIDIA SkillEvaluator Measures Skill Lift, Where Static Scans Fall ShortThe Apache-2.0 tool pairs three tiers of checks with a paper reporting a 0.14 correlation between scans and LLM judges across 145 real skills.