Show HN: Alloy CSS, dialogs, menus and tabs that work with JavaScript off
Alloy CSS is a design system that implements interactive components like dialogs, menus, and tabs using native browser features without any JavaScript.
summary is enough The landing page demo and creator's breakdown offer a neat look at building complex UI components using only modern CSS and HTML primitives.
summary
Alloy CSS is a design system that enables interactive UI patterns like modals, tabs, and menus using native browser capabilities such as the popover API, dialog elements, and has selectors, entirely without JavaScript. The creator built it as a reusable kit to avoid loading heavy JS frameworks for basic widget interactivity. The comment thread explores the trade-offs of CSS-only components, touching on accessibility challenges, the complexity of CSS layouts, and how easily AI agents can generate pages using the framework's structured scale.
key points
- Leverages modern native browser features like dialog elements, popover APIs, and has selectors to handle interactivity without JavaScript.
- Designed with a fixed class scale to maintain consistency and allow AI agents to reliably generate pages via an llms.txt spec.
- Commenters debate the accessibility tradeoffs and the notorious complexity of achieving robust layouts and responsive nav menus in pure CSS.
who should read it
Frontend developers and minimalists interested in reducing JavaScript dependencies through modern CSS features.
discussion warm
consensus
Commenters appreciate the minimalist, zero-JS approach and the durability of server-rendered HTML, though many note that achieving complex layouts or full accessibility purely in CSS can be a frustrating exercise.
pushback
Some users raise serious concerns about accessibility gaps, such as missing ARIA updates or screen reader awareness, when using CSS-only UI patterns instead of standard scripts.
Hi HN, I'm Fandy.
This started in 2018 as the stylesheet I kept copying between client projects. Most were server-rendered apps, and every one ended up loading a JS library just to open a dropdown or a modal.
Browsers caught up. <dialog> with commandfor, popover and :has() now do most of that natively, so this year I rebuilt the kit around them. The link is one HTML file, an invoicing screen, with only the stylesheet and no script. Menus, the dialog, the drawer, tabs, tooltips and the toast all work. Turn JavaScript off and try it, then view the source.
It isn't classless like Pico (sad to …
The creator details how the library leverages recent browser standards and how it integrates with AI tools via an llms.txt spec.
Generated by an LLM from the article and thread. Check the sources before relying on it.