Skip navigation
Announcing Monochrome, an accessible UI component library in 2.2kB. HTML-first.
0:00 / 0:27

Announcing Monochrome, an accessible UI component library in 2.2kB. HTML-first.

Colin

@cvaneenige2K followers

Visit on X
610 likesDownloadOriginal post

52,082 views

Announcing Monochrome, an accessible UI component library in 2.2kB. HTML-first. Works with any framework. Zero dependencies.

26 Comments

Comments from the original post on X (Twitter)

  • Colin's profile picture

    @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

  • Colin's profile picture

    @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

  • Colin's profile picture

    @cvaneenige

    Docs: Source:

    23 likes

  • Terkel's profile picture

    @terkelg

    Code poetry

    2 likes

  • Colin's profile picture

    @cvaneenige

    Means a lot, thank you.

    1 like

  • D7460N's profile picture

    @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

  • Cog_'s profile picture

    @SMchustle

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

    2 likes

  • Colin's profile picture

    @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's profile picture

    @_zouhir

    Clean 🧼 ✨

    1 like

  • Josh Billington's profile picture

    @joshthedevguy

    love this

    1 like

  • rusty.wtf's profile picture

    @rustydotwtf

    ooo i will definitely be using this

    1 like

  • polihedge's profile picture

    @polihedge

    Nice!

    1 like

  • Tim Mikeladze's profile picture

    @linesofcode

    Cool! What’s the overlap between this and htmx?

    1 like

  • Colin's profile picture

    @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

  • Tim Mikeladze's profile picture

    @linesofcode

    Would be curious to see it! Keep crushing it.

    1 like

  • Adriano Fernandes's profile picture

    @djadriano

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

    1 like

  • Kehinde's profile picture

    @adeleke5140

    Love lightweight libraries.

    1 like

  • neesh chaudhary~*'s profile picture

    @losingmyego

    👑

  • myf (formerly myf)'s profile picture

    @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?

  • Bogdan's profile picture

    @hellobogdan

    yo, what do you use to make your videos?