Scrollbars

One axis for every scroll container: the browser's bar, a macOS overlay, the Windows Fluent bar or none at all, plus what the page does under a dialog.

Styles#

Each box below carries its own style. Scroll them, hover them, grab a thumb. The bars are drawn from the foreground role, so they follow every theme and concept with no extra work.

INV-1042Northwind StudioDue Nov 18€1,240.00
INV-1043Halcyon LabsDue Nov 19€860.00
INV-1044Fernhill & CoDue Nov 21€3,120.00
INV-1045Atlas FreightDue Nov 22€415.50
INV-1046Mirador HotelsDue Nov 24€2,080.00
INV-1047Quarry CoffeeDue Nov 25€96.40
INV-1048Lumen HealthDue Nov 27€5,400.00
INV-1049Pine Ridge FarmsDue Nov 28€728.00
INV-1050Orbit MobilityDue Dec 01€1,915.00
INV-1051Salt & EmberDue Dec 02€342.00
NativeThe browser's own bar, whatever the platform draws.
INV-1042Northwind StudioDue Nov 18€1,240.00
INV-1043Halcyon LabsDue Nov 19€860.00
INV-1044Fernhill & CoDue Nov 21€3,120.00
INV-1045Atlas FreightDue Nov 22€415.50
INV-1046Mirador HotelsDue Nov 24€2,080.00
INV-1047Quarry CoffeeDue Nov 25€96.40
INV-1048Lumen HealthDue Nov 27€5,400.00
INV-1049Pine Ridge FarmsDue Nov 28€728.00
INV-1050Orbit MobilityDue Dec 01€1,915.00
INV-1051Salt & EmberDue Dec 02€342.00
macOSOverlay pill that shows while you scroll and hides at rest.
INV-1042Northwind StudioDue Nov 18€1,240.00
INV-1043Halcyon LabsDue Nov 19€860.00
INV-1044Fernhill & CoDue Nov 21€3,120.00
INV-1045Atlas FreightDue Nov 22€415.50
INV-1046Mirador HotelsDue Nov 24€2,080.00
INV-1047Quarry CoffeeDue Nov 25€96.40
INV-1048Lumen HealthDue Nov 27€5,400.00
INV-1049Pine Ridge FarmsDue Nov 28€728.00
INV-1050Orbit MobilityDue Dec 01€1,915.00
INV-1051Salt & EmberDue Dec 02€342.00
WindowsFluent line that opens into a thumb, track and arrows on hover.
INV-1042Northwind StudioDue Nov 18€1,240.00
INV-1043Halcyon LabsDue Nov 19€860.00
INV-1044Fernhill & CoDue Nov 21€3,120.00
INV-1045Atlas FreightDue Nov 22€415.50
INV-1046Mirador HotelsDue Nov 24€2,080.00
INV-1047Quarry CoffeeDue Nov 25€96.40
INV-1048Lumen HealthDue Nov 27€5,400.00
INV-1049Pine Ridge FarmsDue Nov 28€728.00
INV-1050Orbit MobilityDue Dec 01€1,915.00
INV-1051Salt & EmberDue Dec 02€342.00
HiddenNo bar at all. Wheel, touch, drag and keyboard still scroll.

native

The browser’s own bar. The default: no attribute, nothing changes.

mac

A 7px pill on a clear track. Shows while you scroll, hides a beat later, widens when grabbed.

windows

A 3px line at rest. On hover it opens into a thumb on a tinted track, with an arrow at each end.

hidden

No bar. Wheel, touch, drag and keyboard still scroll. Pair it with scroll-fade.

Page-wide#

Picked here, the style lands on <html> and reaches every scroller on the page, menus and dialogs included. Then open the dialog to feel the lock.

Under a dialog#

lock is the default: the page freezes under any modal (Dialog, Sheet, Alert Dialog, a modal menu). With a styled bar the gutter stays reserved, so when the bar goes nothing slides sideways, not even a fixed header. free lets the page keep scrolling under the dialog while focus stays trapped inside it.

lock

Page frozen under a modal, no layout shift. The default.

free

Page keeps its bar and keeps scrolling. Wheel and touch over the page pass through.

Setup#

The styles ship in app/scrollbars.css, imported from globals.css. For a fixed style, set the attributes on <html> and you are done. To let people pick, mount ScrollbarProvider: it persists the choice, shows the macOS bar while scrolling and runs the free lock.

app/layout.tsxTSX
<html data-scrollbar="mac" data-scroll-lock="lock">  <body>    <ScrollbarProvider>{children}</ScrollbarProvider>  </body></html>

The attribute also scopes: put data-scrollbar on any wrapper and only that subtree changes. A component that hides its own bar (TabStrip, Lightbox, InkTray) keeps it hidden under every style. Retune the ink per theme with the tokens.

globals.cssTSX
:root {  --scrollbar-thumb: color-mix(in oklab, var(--foreground) 32%, transparent);  --scrollbar-thumb-hover: color-mix(in oklab, var(--foreground) 48%, transparent);  --scrollbar-thumb-active: color-mix(in oklab, var(--foreground) 60%, transparent);  --scrollbar-track: color-mix(in oklab, var(--foreground) 5%, transparent);  --scrollbar-arrow: color-mix(in oklab, var(--foreground) 55%, transparent);}

Chrome, Edge and Safari draw the full shapes. Firefox has no way to style a scrollbar beyond width and colour, so it gets a thin bar in the same ink, and the macOS one still hides at rest.