Live data from Hacker News

React Aria: A headless UI component library

react-spectrum.adobe.com

61–70 of 73 posts

Re: React Aria: A headless UI component library

#62
post #16

Earlier quoted context omitted.

It's not a thing, this is just a term made up on the spot by the author of this article to describe a component library that has no built-in style. "What does it even do then" you ask. It implements basic accessibility patterns so you only deal with high level UI elements and not have to worry about having the correct `role-` or `aria-` attributes. That and composite elements such as tabs or modals Why no style? Most…

HeadlessUI[1] has been around for over a year, it's not a term this author made up [1] https://headlessui.dev/

HeadlessUI is one of the newcomers, with a lot of name recognition due to its affiliation with the wildly popular library Tailwind. The term has been around much longer. The first commit of the awesome list was over 3 years ago, and I suspect the term was already fairly established at that point: https://github.com/jxom/awesome-react-headless-components/co...

Re: React Aria: A headless UI component library

#63

The never ending battle between customizability and uniqueness. If there were a standard library (adopted by all browsers) similar to the default look of iOS and Android apps, but in return you couldn't customize the look, would y'all go with that?

I suspect many people would use that for the functionality that it provided, but web standards are always going to move slower than individual developers and UI trends, and that’s good! Imagine if we had to wait for web standards to develop a road map element.

Re: React Aria: A headless UI component library

#64

Earlier quoted context omitted.

My advice - start with Next.js. Only got started with React myself a year ago (and love it) and to be gone it’s I though, I’ll just stick to nice simple react I bet I don’t need the other stuff. And then, I gradually realised why people use all this other stuff. Next.js solves so many problems!

Not interested in the server-side stuff as I don't use JS/Node on the backend. I see that Next.js is a Node framework, so unless there's a cut down client-side only version that's useful, not sure it'll fit the bill. I was looking at Alpine.js but it's pretty minimal, so I want something more full-featured to compare to. These headless UIs look useful, and some have React and Vue versions.

don't be so fast to dismiss needing 'server side stuff'

one pitfall of react that it fixed for me was escaping the single page gracefully.

for example, if you want to have any other /pages that can be shared properly on facebook / get index on a search engine, then you NEED to render that on the server (can be statically generated with next.js so you still don't need a server)

doing routing with pure react is a complete headache and mess of code, plus it will not get indexed properly / look right on a search engine.

if you start with next.js, you lose none of the react functionality, add very little overhead, and can actually make a functioning website a lot more easily.

like i said, i rejected it to begin with too - but it is super useful and super easy to use. don't make my mistakes all over again!

Re: React Aria: A headless UI component library

#65

Man, this must be such tedious hell to test

Haha yes it is. We have to do a ton of manual testing to ensure consistency and compatibility across many devices, browsers, and screen readers.

Some of my tweets showing how we do this:

- https://twitter.com/devongovett/status/1318600389462126592 - https://twitter.com/devongovett/status/1270410802395111424 - https://twitter.com/devongovett/status/1318676759080968193

Re: React Aria: A headless UI component library

#68
I've been using react-aria on a personal project, as well as building a UI library at work based on TailwindCSS+React Aria. I generally really like the combination.

The maintainers are super responsive+helpful on Github and really know how to engage constructively with criticism.

I really appreciate what they're doing. The combination of TailwindCSS+React Aria provides one with a pretty great template/scaffolding for building out a fully featured component library.

The only downside that I've found is that their typescript support can be a little weird in my experience, but their approach is nonetheless well considered imo. edit: https://github.com/adobe/react-spectrum/pull/1761#issuecomme... is a decent summary of what I'm referring.

Re: React Aria: A headless UI component library

#69
post #35
post #32

Earlier quoted context omitted.

Wait... electron isn't cross-platform?

In theory, but the developer still has to build it for each platform separately. Often they don't bother. It's not hard to find Windows-only Electron apps. This stands in contrast to webpages, which "just work" everywhere.

I was unable to create a Mac and Windows builds on Linux hist. Super annoying. Pretty sure it was just me, though. Can't imagine people have different build machines for each platform There has to be a better way

Re: React Aria: A headless UI component library

#70
post #6

Earlier quoted context omitted.

Why not just use default html elements?

They’re pretty lacking. is a great example: no searching/filtering, no ability to have styled/multiline text in s, nor anything that’s not plain text (so no SVG iconography for example). People constantly have to reinvent the wheel to offer fairly basic functionality, so it’s good that there are libraries to handle the behaviour and accessibility side well while supporting whatever visual styles you want to make.

I feel like a big problem here is that the Getting Started starts with a bunch of code that just... outputs a bare button. Starting with something like a combobox would show much more value.
Post reply on HN