Announcing Monochrome, an accessible UI component library in 2.2kB. HTML-first.
@cvaneenige2K followers
52,082 views
26 Comments
Comments from the original post on X (Twitter)

@cvaneenige
The entire library is minimal event listeners that handle everything. No per-component initialization and no internal state. The DOM is the source of truth.
8 likes

@cvaneenige
React wrappers are included, but React on the client is not required. The components render the correct HTML structure, all interactivity comes from the same 2kB core. No state, no useEffect, no hydration.
6 likes

@cvaneenige
Docs: Source:
23 likes

@terkelg
Code poetry
2 likes

@cvaneenige
Means a lot, thank you.
1 like

@D7460N
Seeing more and more like this, standards driven, zero dependencies, and data-agnostic out-of-the-box. "Have UI, bring data." Great job!
2 likes

@SMchustle
Interesting and love ppl open sourcing libraries. The functionality is simplistic. Does someone really need a library for this?
2 likes

@cvaneenige
While it looks simple, there is actually a lot of logic under the hood to make it accessible. The menu alone comes in at 175 automated tests. The real complexity is the one you can't see.
5 likes

@_zouhir
Clean 🧼 ✨
1 like

@joshthedevguy
love this
1 like

@rustydotwtf
ooo i will definitely be using this
1 like

@polihedge
Nice!
1 like

@linesofcode
Cool! What’s the overlap between this and htmx?
1 like

@cvaneenige
They're different and should pair nicely! HTMX does the server-driven updates in HTML, while Monochrome can be seen as the lightweight accessibility layer on top. I should make a demo with both combined.
1 like

@linesofcode
Would be curious to see it! Keep crushing it.
1 like

@djadriano
oh man, this is amazing, using the standards and keeping it clean. Good work
1 like

@adeleke5140
Love lightweight libraries.
1 like

@losingmyego
👑

@myfonj
Do I understand correctly, that at this point, all components optimistically assume that JS is enabled and work, and that without JS they produce technically unreachable content? Is addressing this and turning it into truly progressive enhanced project in the backlog?

@hellobogdan
yo, what do you use to make your videos?



