Show HN: Niui 3.0 – lightweight, rich, accessible front end (niui.dev)
Here is a library of the most common components I've created in the last decade. It aims to solve the toughest UI problems like Carousel, Modal and Select, while using native browser capabilities as much as possible, and focusing on accessibility, stability and customisation. 14 KB of CSS, JS optional.
39 comments
[ 3.4 ms ] story [ 98.7 ms ] threadI understand scroll snapping for a gallery, but this is text, and there's nothing more natural and ingrained then scrolling through text, so I don't think the default behaviour should be changed here.
Why shouldn't this be one long page that you can scroll through normally?
Looks very complete too. I laughed at the "Overpowered, undersized" description.
Does it allow theming? It's all very flat which I know is fashionable but it looks to me like it's really in need of a few gradients or shadows or something on the buttons, dropdowns etc.
Edit: on firefox it works better (I was on qute), but it still snaps into places while scrolling which makes reading it annoying still.
It uses the native CSS scroll-snap, which is why it varies by browser. But being unable to scroll down to read the rest of any given section because it snaps back up to the top is awful.
It's almost usable with a trackpad, if you can scroll the entire length of the section with a single gesture. Then you can just hold your digits in place to prevent the snap. But if your trackpad isn't the size of an Apple Magic Trackpad, you're gonna have issues. Same with if you don't even have a trackpad, or are using your trackpad over RDP (as I am).
Nobody comes to this page thinking it's slides. There's no expectation it would or should work like this. It adds a feature that makes the site harder to use.
It's unusable for me, so as a demonstration the first thing it tells me is: I can't trust any of it will function well.
Instead, were I to discover a bit later after exploring the site more that one particular thing wasn't working, it'd be easier to forgive. But, as it is now, it creates an instant wrong impression, and with no way to explore to rectify it.
> as indicated by the tabs on the left
No, the links on the left don't indicate it's a carousel at all. They are just links, they could indicate different pages, relative anchor links, popups or any other things, among which they might be a carousel. But they don't "indicate" that it's a carousel in particular.
Please don't ever override the scrolling behavior of the browser of a website, it too often leads to inaccessible content and/or the user getting lost.
For what it’s worth, the scroll stuff this whole thread is complaining about doesn’t bother me at all (on mobile). Feels like quite reasonable use of scroll snapping. It’s native, so your platform is providing the implementation.
But if I'm going to use a quirky framework, I'd rather use my own.