logoalt Hacker News

apples_orangestoday at 10:40 AM3 repliesview on HN

please don't hide scrollbars :)


Replies

chrismorgantoday at 11:05 AM

Yeah, that was the first one my eyes went to. The only scenarios I can think of where it is acceptable to hide scrollbars are infinite canvases where you’ll draw your own non-linear ones (and even then be disappointed because they can’t look or behave natively), and things like maps where you remap scrolling to zoom and might want to use a backing invisible scroll area for that rather than consuming scroll events (which are somewhat more limited).

In short: unless the native scroll bar will be wrong, do not under any circumstances hide it.

marcomezzavillatoday at 10:50 AM

If you mean the "Hide scrollbars" note, I agree 100% (:

There are a few specific situations where it can be useful, but I added the caveat precisely because it’s generally not a good practice.

show 1 reply
afavourtoday at 11:59 AM

Only time I've seen that work is when making a carousel. Once you're using scroll snap it's already not going to behave the way you'd expect a scrollable container to, so having a different indicator doesn't feel so egregious to me.