Alloy CSS - JavaScript-free dialogs, menus, and tabs
Show HN: Alloy CSS, dialogs, menus and tabs that work with JavaScript off
Alloy CSS is a lightweight CSS library that brings interactive UI components like dialogs, menus, and tabs to life without a single line of JavaScript. The included Ledger example—a fully functional invoice dashboard—demonstrates how you can build complex, stateful interfaces using only HTML and CSS. Perfect for developers who want faster load times, better accessibility, and simpler codebases, Alloy CSS proves that modern web apps don't always need JavaScript for interactivity.
Ledger is a made-up app. This page is one HTML file with Alloy CSS and no JavaScript.
- kyledrake
If I was working on web standards, I would focus on trying to make the browser able to do as much as possible without JavaScript. Having to use JS to post a form dynamically for example is extremely overkill and a security problem. If we could avoid it more often, we could use CSP headers and disable it on a lot more security critical sites. If doing accessibility is a problem without JS, well then there's a great thing to get started on fixing.
Just read this article this morning which I think highlights the problem: https://www.newsweek.com/cyber-attack-websites-affected-1272...
I think it's really cool that browsers are VMs that can run Doom now but I really think we need to come back and focus on the basics again: HTML as hand-editable documents you read, more interface components, accessibility tools. Not sure the Gemini protocol (https://en.wikipedia.org/wiki/Gemini_(protocol) will succeed but I understand and loved the spirit of it.
- edoceo
The classes are many and use common names that would conflict with existing style making this tedious to add into existing, but for green field I might give it a try. Maybe your css builder lets me prefix?
- momojo
I literally just ran into an issue where I made a sandbox a little too restrictive and claude couldn't pull down a javascript runtime in order to complete its little unittests. Now I'm wondering how much time Claude has spent spinning up V8-isolates for mostly static frontends that i just didn't know about.
- skrtskrt
Making a standard horizontal nav menu that can also collapse to a toggle-able mobile side menu is one of those things that just exposes how CSS is truly the most tedious, horribly-designed thing in the history of computing.
I started trying to learn how to do this by following tutorials and a copying a lot of big websites that had visually attractive designs and in the end every single one is actually full of bugs, has no accessibility, or requires a brittle pile of 12+ different CSS directives that collapse if they're not all put together perfectly.
Through looking at these big sites, I have realized a lot of them write two completely different nav bars and just hide one when you swap to a mobile view.
This helps a bit, but the fixed/absolute positioning crap you have to do to float things for the mobile-style menus is still hideous heap of hacks.
- metalliqaz
I really like the idea of minimalism and doing as much as possible without js. I love the look and feel of sites that do what they need without client side programming. Maybe I'm just old fashioned but it seems more permanent, more stable, more content oriented, more useful