NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Oat – Ultra-lightweight, semantic, zero-dependency HTML UI component library (oat.ink)
jamamp 3 hours ago [-]
I think it's valiant to try to do all of this with semantic HTML elements to achieve the right effects, and try to go for a "classless CSS" paradigm to get a nice looking and functional web app (as a fan of classless CSS myself). But scrolling through the component catalog, it unfortunately feels like it's all over the place and inconsistent with semantic vs basic elements, data tags vs aria attributes, and sprinkling some css classes over some of it.

I do very much like that by introducing aria attributes, the CSS reacts to it and styles it appropriately. As opposed to a full-blown react component library which does all of that for you. It would be a good exercise for developers to think aria-first and let the library just help with styling.

Lastly, I think the best part is that this component library has a native sidebar. So many of these I see and they have a nice web page which showcases all the components and I want to replicate their layout and nav/sidebars but they only focus on smaller re-usable components and not the layout. So that's a nice touch, I think. And, as someone who keeps an eye on but doesn't do a lot of frontend, the fact that a sidebar is an aside > nav > ul next to a main just makes so much sense and doesn't have a lot of cruft around it.

swiftcoder 11 hours ago [-]
The motivating blog post[1] linked from the front page is probably going to generate a more interesting discussion than the framework itself.

As someone who has to deal with both angular and nextjs for different (but overlapping) stacks at work, I find myself increasingly sympathetic to this viewpoint.

[1]: https://nadh.in/blog/javascript-ecosystem-software-developme...

e12e 4 hours ago [-]
Nice link - still relevant IMNHO - even though it's from 2021.

Discussed at the time:

https://news.ycombinator.com/item?id=28892933

latchkey 2 hours ago [-]
It has updates at the bottom. Most recently 14 Sep 2025.
skeledrew 5 hours ago [-]
This website pleases me greatly. 0 time from tap to fully loaded pages.
xyzzy_plugh 5 hours ago [-]
swiftcoder 5 hours ago [-]
Ah ha, figured it must have been discussed here before!
altcunn 1 hours ago [-]
The aria-first approach is underrated here. Most component libraries treat accessibility as an afterthought — you build your UI with divs and classes, then bolt on aria attributes later. Oat inverts this: write the semantic HTML with aria attributes, and the CSS reacts to the state. That's how it should work.

The practical benefit is that your HTML remains meaningful without the CSS loaded at all. Try disabling stylesheets on a typical React component library vs. this — the difference in readability is night and day.

The 18KB total size is notable too. For context, that's smaller than most hero images on a landing page. For internal tools, admin panels, or any project where you don't want to maintain a build pipeline just for UI, this hits a nice sweet spot between raw HTML and a full framework.

boston_clone 45 minutes ago [-]
Generated comments and bots aren't allowed here, see: https://news.ycombinator.com/item?id=46888857
wvlia5 6 minutes ago [-]
How did you detect it?
skeledrew 5 hours ago [-]
This site got me going. Almost had whiplash when I tapped a link and the page loaded literally instantly. I've almost forgotten that that's possible on the internet. I'm not a web dev, but I'm inspired to get into it now because of this site.
darkvertex 4 hours ago [-]
You should try making a site with Astro. Load speed is cray cray.
allthetime 2 hours ago [-]
Yeah I’m a recent Astro convert. To be fair, any static site will have this effect. It’s just everyone is using react to make landing pages now.
1718627440 24 minutes ago [-]
I mean you also have HN as a reference.
roxolotl 7 hours ago [-]
There’s a ton of semantic drop in css libraries similar to this. Love seeing new ones. Quality varies wildly but this site shows 50+ drop in stylesheets for those writing semantic html: https://dohliam.github.io/dropin-minimal-css/
layer8 2 hours ago [-]
I had to read your comment three times before figuring out that you mean “drop-in”. Sometimes hyphens do matter! :)
neya 2 hours ago [-]
This isn't upvoted enough. This is more interesting than the OP's project! Thanks for sharing!
heyyeah 43 minutes ago [-]
do you have any recommendations from the list?
sgc 3 hours ago [-]
I love it. You can use the right arrow to cycle through them.
jitbit 27 minutes ago [-]
I tried doing something like that in my app, and quickly discovered that some modern semantic/functional tags are STILL not supported in some browsers. Or work badly.

For example, in Safari showModal for a dialog tag causes recalculating layout for EVERY element on a page, it’s up to 59x slower than chromium…. :(

But I love the idea

anton-107 6 hours ago [-]
Why do all the UI component libraries always feature an accordion (something i can build myself in 5 minutes and very rarely need), but always omit a date picker / calendar component (something that is needed almost in every corporate web form and really requires a lot of effort to build)?
anton-107 6 hours ago [-]
I must appoligize - it is there, hidden under "Form elements" in the left menu. Kudos to the authors!
speedgoose 6 hours ago [-]
Isn't it the one from the web browser? An <input type="datetime-local" />

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...

webstrand 5 hours ago [-]
That one is highly inconsistent, on some platforms its useless. For instance on Chrome/linux entering historic dates via the datepicker takes minutes to slowly scroll through the years. Always build your own datepicker, you know better what UX pattern will best suit your application and your users.
JSR_FDED 6 hours ago [-]
This has the simplicity I thought I was going to get from DaisyUI but didn’t. Pairing this with Datastar seems like a super powerful combination that leans on actual web standards, not “ecosystems”.
mrbluecoat 43 minutes ago [-]
Nice solution. Reminds me of https://semantic-ui.com/ and https://fomantic-ui.com/
elseleigh 1 hours ago [-]
This is a very nice library. At a first reading it seems complete (but did I see summary/detail - I don't remember). Bookmarked for further investigation. Congratulations and thank you.
scandinavian 11 hours ago [-]
5 day old repo, 2000 stars on GitHub, 400 total weekly downloads on npm. Frontpage of hacker news with a bunch of weird comments. Moderation has been lacking recently.
codegeek 7 hours ago [-]
You are jumping to conclusions. The author is the CTO of the largest online brokerage in India but more importantly, they have created many open source software of good quality. His website and blog are of great quality. Whether you think this library deserves more attention or not is your personal preference but it is far from spam. I havr no affiliation with them but like their work.
bityard 6 hours ago [-]
It's possible for both things to be true: this project is written by a developer well-known within India, AND this thread has a lot of bot (bought?) comments of praise in it.
ssiddharth 10 hours ago [-]
The author is the CTO of Zerodha, India’s largest online brokerage. Not that it matters, just an observation.
smarx007 10 hours ago [-]
I thought they also OSSed a pretty solid https://github.com/frappe/helpdesk helpdesk but that was from Frappe, not Zerodha.
isodev 9 hours ago [-]
A CTO that codes? Interesting indeed.
simonw 3 hours ago [-]
That's pretty common in small companies. It's less common in large companies but can happen - you may use the "CTO" title for the founding engineer who still leads code and architecture, then hire someone under a different title (frequently "VP of Engineering") to handle the management / team growing side of the role.
appplication 3 hours ago [-]
That sounds like a reasonable split to me, so much so I’m not sure I’d understand why you’d want the same person handling both code/architecture and management.
subscribed 6 hours ago [-]
CTO in my company* remains SME on a several components, commits to several production repositories (and expects the most stringent PR checks), and maintains couple of small tool used by us and the customers.

Its not that rare I think.

*small fintech with couple of billions in the accounts, not a startup, not a Fortune 500 company

sschueller 10 hours ago [-]
Sad that HN is now also getting boted by LLMs. People are just shameless. HN is one of the few places left where you can post / self promote something you have made only for people to take advantage of it.
ZeWaka 10 hours ago [-]
The strangest part is the weird commenting accounts have pretty old account ages.
quadrifoliate 10 hours ago [-]
I don't know if you're demonstrating reductio ad absurdum, but maybe that's because they are genuine? As people in the thread have pointed out, the author as well as their company is pretty well-known in software circles. They have had multiple projects discussed on HN in the past[1]. 2000 stars is not a lot given that [2].

I fail to understand why a ton of breathless blog posts about the process of AI-assisted coding are more interesting to HNers than some of the actual code (potentially, not claiming anything about it) written.

Maybe you or the GP could actually say what you think are "weird comments" and why you think this is being "boted"?

---------------

[1] https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...

[2] Why are people obsessed with star counts? I at least only star things to bookmark them, not vouch for them in any way. It does not seem unreasonable to me that 5 times as many people bookmarked the repo in the early days than are using it on npm. Also, npm is not necessary, the author shows at least 2 other ways to use it (direct download, link to GitHub pages) which will not show up in npm stats.

sfdlkj3jk342a 9 hours ago [-]
> I love it. We need to see more of this.

> Use of semantic elements is an interesting take. I'll give it a try.

> Thank you for this, can’t wait to use. Minimalism at its best.

> Good one. Presentation is good too. Thanks

These are the kind of comments you see from Indians paid to boost Youtube content.

skeledrew 5 hours ago [-]
I'm on the other side of the planet, generally not a fan of web dev, and heartily agree with the sentiments in that comment.
hkt 48 minutes ago [-]
Same here, DevOps by trade, allergic to ridiculous frontend nonsense, my comment praised the framework.
n_e 6 hours ago [-]
An explanation that would fit both the old accounts and the artificial comments would be that they were encouraged by the author to comment (which is against the HN rules).
jonathanstrange 7 hours ago [-]
They're probably just Indians using the framework saying "thanks." India has the largest population on Earth, they're close to 1.5 billion now. I think some people underestimate what that means.
quadrifoliate 5 hours ago [-]
This seems like some pretty lazy analysis to be honest.

Following the first comment you quoted...

> I love it. We need to see more of this.

...shows that the author talks about using a “Chase card abroad” in a previous comment [1], which means they cannot be Indian as Chase doesn't issue cards or have substantial operations in India.

I don't want to run around following specific comment authors back through their threads, but as an Indian by birth it is pretty hurtful to see this kind of drive-by casual characterization of an population in a space like this. It also seems to be pretty contrary to the HN guidelines (“Please don't sneer, including at the rest of the community.”)

--------------

[1] https://news.ycombinator.com/item?id=46535775

debarshri 9 hours ago [-]
It is probably not bots. The reach of authors is pretty good. He actually loyal fan followers in india. You can see the same when he shows up on a podcast or talk.

I think theres alot indian developers who are hacker news as well as on github and other forums.

JasonADrury 9 hours ago [-]
Why do all the comments look exactly like paid comment spam?
debarshri 9 hours ago [-]
On second look. It could be spam. This is disappointing.
decremental 9 hours ago [-]
[dead]
e2le 6 hours ago [-]
Perhaps stolen accounts? I doubt every user is practising good security hygiene with a unique password per each account. Password leaks from other sites might well allow a motivated individual to hijack some here.
leke 5 hours ago [-]
I could speculate that someone in the past had the business mindset to create thousands of accounts over multiple sites and offers the ability to loan them out for a period of time.
gas9S9zw3P9c 8 hours ago [-]
If you search you can easily find sites to buy aged HN accounts, lots of them. Just like reddit accounts.
6 hours ago [-]
eddd-ddde 4 hours ago [-]
The "preview" and "code" buttons in the components break the "alt+arrow" bindings to go back to the previous page. Instead it just alternates between "preview" and "code".
potato-peeler 10 hours ago [-]
Thank you testing this on older browsers before releasing. This is truly an ultra minimal library - https://ibb.co/DDGmLYdg, https://ibb.co/h1WQG3GK
appplication 3 hours ago [-]
Genuine question, do you normally use old browsers as your daily driver for interfacing with the web? I’d be interested in learning why.
hiyer 9 hours ago [-]
Reminds me of what bootstrap [1] was like around a decade ago. It's gotten quite a bit bloated since then though.

1. https://getbootstrap.com/

temporallobe 3 hours ago [-]
This is of special interest to me, because man do I hate UI frameworks with tons of external dependencies. Looking at you, Bootstrap.
mxuribe 23 minutes ago [-]
I used to think bootstrap was bloated too...and then i had heard - now, i don't know if its true - that bootstrap was originally intended *ONLY* as an internal prototype building tool, and any bloat did not matter...because expected audience, usage would be totally fine for a bloated framework...When i heard, i gave boostrap more of a pass...but, then again, i stopped using it, and began using other, lighter weight frameworks...and nowadays, i so rarely touch any web stuff...and when i do its only for me so then use zero frameworks, and merely display whatever default the browser shows with zero CSS, javascript...then again, my private web page needs are so basic anyway.
hkt 1 hours ago [-]
This is gorgeous. I hate frontend because of its sheer gratuity, and this is the kind of thing that might get me back into it. The only other contender for interactivity I'd consider is HTMX, and I'm going to boldly assume I'll be able to combine them without too much bother.

Bravo to the author, keep at it. I'll be recommending this to anyone who will listen.

scirob 43 minutes ago [-]
ultra-lightweight, these dev's probably go hiking. I like : )
rohitpaulk 10 hours ago [-]
Surprised that none of the comments here are comparing this to Bootstrap.
weiliddat 10 hours ago [-]
Yeah reminds me of early Bootstrap
JCattheATM 6 hours ago [-]
Wouldn't a comparison to Bulma be more apt?
kitd 11 hours ago [-]
Great work! PicoCSS feels a bit too minimalist at times. This looks like a better balance of lightweight and functional.
masklinn 5 hours ago [-]
It’s a bit odd that the accordion uses details but the dropdowns require a custom element.
nkmnz 5 hours ago [-]
I know that guy from listmonk! I always thought the frontend could use some love and planned to spend a couple of days on contributing a couple of ideas, but I never came around. Now I know why things are as they are :)
scandox 3 hours ago [-]
Was looking at the spinner component for a few seconds thinking "that's a bit slow"...
vpribish 20 minutes ago [-]
how do you contrast this with https://picocss.com/ ?

I like your presentation of the components, but i'm having trouble finding the essential distinctions

mkl 11 hours ago [-]
Seems pretty unresponsive to me. I'm getting at least half a second of delay before the accordion, drop-down, or switch do anything. Chrome on Windows.
skeledrew 5 hours ago [-]
I have 0 delay for all parts of it. Everything loads and works instantaneously. Firefox on Android.
Xeoncross 6 hours ago [-]
Thank you for sharing, I would like to see a navigation/menu component added though as that's required for most websites.
jlg23 11 hours ago [-]
My initial reaction was that I have to use this just because of the buzzword density in the title. But after reading up, it looks like the author was pretty successful in moving the bloat from code to announcement title. I'll give this a try!
bpev 11 hours ago [-]
Amazing! I recently started building something similar for the same reasons, but more out of frustration rather than out of desire. I'll have to give this one a try and see if it fills the need.
neon_me 12 hours ago [-]
Nice job! Clicked tru my obscure mobile firefox and all worked well!
TrevorFSmith 8 hours ago [-]
If nothing else, it's refreshing to see nicely modern CSS and JS formatted and laid out in a legible manner. https://github.com/knadh/oat/tree/master/src
Maxion 11 hours ago [-]
This looks very very cool. Will definitely look in to using this for more static internal tools!
intrasight 4 hours ago [-]
What's with variable names starting with "#" as first character?
afishhh 4 hours ago [-]
If you are referring to class members in the JavaScript then those are private fields[1]

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

intrasight 56 minutes ago [-]
I had Googled my question too. Got no hits which is why I asked. Haven't seen it before.
animal_spirits 4 hours ago [-]
That's just markdown headers. Some people like to include # as part of the header aesthetic
chrisweekly 3 hours ago [-]
No, the Q was about javascript not markdown. Peer comment from afishh (9m after yours) has it right.
gaigalas 3 hours ago [-]
The form component:

https://oat.ink/components/#form

Looks a lot like a raw HTML+CSS framework I made in 2009:

https://alganet.github.io/ghiaweb/ (it has some small glitches, browser widgets changed a lot since 2009).

Particularly the use of the label, fieldset and legend elements as native accessible solutions instead of instrumenting divs. Even the styling and the example resembles it a bit!

https://oat.ink/components/#grid

This is where it falls from grace IMHO. Grid classes are fundamentally non-semantic. I know they're popular and useful, but there must be a better (semantic) way of doing this. I haven't found it yet, but there must be.

andrei_says_ 11 hours ago [-]
Thank you for this, can’t wait to use. Minimalism at its best.
10 hours ago [-]
mgaunard 10 hours ago [-]
The code example doesn't render for me.
freeopinion 4 hours ago [-]
Ditto, if you mean the codeblock in the Typography section.

edit: clarification, focus

freeopinion 4 hours ago [-]
The Preview of the Sidebar doesn't display the Logout button in the footer of the sidebar.

edit: That is, the footer is not within a visible area of the sidebar.

superkuh 5 hours ago [-]
No, this is "Oat - Ultra-lightweight, semantic, zero-dependency Javascript UI component library". If it doesn't work without javascript it is not an HTML UI component library.
koakuma-chan 11 hours ago [-]
This is kind of misleading. It says it's an HTML UI library, then it says HTML + CSS, and then it says it also includes JavaScript. Why is this better than, say, DaisyUI?
httpsterio 10 hours ago [-]
Iirc there's a few web components in there which would require js.
villgax 8 hours ago [-]
I just want something that's as easy to use as DaisyUI or even Bulma with one good set of components & themeing(beyond just palletes, like rounding, blur, transparency etc) & I'm good. For all the self-hosting model afficianados surely needing a build platform to create a blackhole of npm modules & internet connectivity for even a single build surely negates the entire point of a coding LLM if we still force it to deal with frontend
koakuma-chan 8 hours ago [-]
You mean you want DaisyUI but with extended theming, like ability to make inputs, etc, rounded? This is also something I was considering.
dankobgd 6 hours ago [-]
People need to stop with these stupid 12 column grids and learn how grid and flex work. Other elements are ok but this is just stupid
pphysch 3 hours ago [-]
It's a 12 column grid system built with CSS Grid. 12 column grids are a common design pattern. What would you propose instead?
yoz-y 11 hours ago [-]
Claims no classes but uses data- attributes and also classes (just look at the button example…)

Looks okay, but I don’t see why to use this over something like Marx if all you need is to not have bare browser default styling.

kitd 7 hours ago [-]
The claim is "no classes for native elements". Ie you don't need classes just to create a button etc.
mcknz 10 hours ago [-]
should call it oatmilk for max exposure
maximalthinker 5 hours ago [-]
Next:

Oath

Oatly

Ooaut

Oaar

deafpolygon 11 hours ago [-]
[flagged]
bartvk 8 hours ago [-]
I'm not a web dev, what do you love about it?
dingi 10 hours ago [-]
[flagged]
rado 11 hours ago [-]
[flagged]
akrauss 10 hours ago [-]
No Datepicker?
bdcravens 4 hours ago [-]
As pointed out in another comment, it's under the form elements, not listed as a top-level component as many UI libraries do

https://oat.ink/components/#form

Which actually makes sense: Oat's driving philosophy seems to be to use and enhance native controls as much as possible, and the date picker is already a native type on the input element.

ziml77 55 minutes ago [-]
But there's no enhancement here. That's just the native date picker control with a bit of styling on the textbox portion of it.
akrauss 3 hours ago [-]
Thanks, I missed that when looking through the component list on the top level.
bartvk 8 hours ago [-]
I'm not a web dev, but doesn't HTML come with a date picker?
LudwigNagasena 5 hours ago [-]
HTML also comes with a button and an accordion.
visarga 11 hours ago [-]
This does not even need a LLM skill, just load the whole code up in context, so efficient.
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 20:19:34 GMT+0000 (Coordinated Universal Time) with Vercel.