Hey everyone 👋

You know when a list gets one item longer, a scrollbar pops in, and everything jumps a few pixels to the left? Buttons move, text re-wraps, centered stuff is suddenly off-center.

That annoyed me enough that I made a little library for it. It's my first one ever.

Before: content shifts when the scrollbar appears. After: nothing moves.

One line, that's it

import { MrScroll } from "plz-mr-scroll/react"; <MrScroll /> 

Put it at the root of your app. You don't add anything to your components.

Not using React? installMrScroll() from plz-mr-scroll does the same thing.

What it actually does

It finds every scroll area on the page and gives the scrollbar a spot that doesn't move your content:

  1. The area has enough right padding → it shrinks that padding by the scrollbar width
  2. The content is centered → it balances both sides so the center stays put
  3. The padding is on the parent → it floats the scrollbar just outside the area
  4. No room anywhere → it floats the scrollbar over the edge of the content

No reserved gutter, and it's still the native scrollbar — not a custom-drawn one.

The scrollbar floats into the sidebar's padding instead of pushing the list.

Try it

Please tell me what's wrong with it 🥲

Since it's my first library, I honestly have no idea what I got wrong. If you have a minute, please try the demo and tell me what's broken, confusing, or just dumb.

P.S. I'm Korean and English isn't my first language, so sorry if anything here reads a bit off.

Thanks for reading!