src/components/overlay-scrollbar.tsxOverlay Scrollbar
The scroll cue for a padded, roundedsurface: a dialog panel, a bounded list. It’s painted over the content, so it costs no layout width: the declared padding renders symmetrically, and nothing shifts when the surface becomes scrollable. Floating menus (Dropdown, Listbox, Combobox) and full-bleed bodies keep the native scrollbar-thin; they have no symmetric padding for a gutter to steal from.
A native bar can’t do this. overflow: overlaywas removed from the platform, and whether bars float or take width is an OS setting a page can’t override, so the only choices were scrollbar-gutter: stable (no reflow, but the gutter is reserved on one side forever) or auto (symmetric at rest, but content lurches sideways when a bar appears).
Native (scrollbar-gutter: stable) vs overlay
Native: the gutter eats the right padding, even before you scroll.
Overlay: padding stays symmetric, the cue still shows.
Wiring: scrollbar-none + overflow-y-auto on the scroller; a relative ancestor that does notscroll (inside the scroller the thumb would scroll away with the content it tracks); refs to the scroller and to a wrapper around its content. Both boxes are observed: the scroller’s own box is usually pinned by a cap and never changes, so watching only it leaves the thumb stranded. insetkeeps the thumb clear of the corner radius (default 24, the dialog panel’s).
Used on
- Console
- /console/console (every page)/console/admin/test-environment/console/business-reporting/console/business-reporting/btw-hours/console/business-reporting/enrollment/console/business-reporting/fleet-size/console/business-reporting/payroll/console/catalog/console/catalog/contracts/[id]/console/certificates/console/curriculum/console/financials/console/financials/balances/console/financials/earned/console/financials/refunds/console/financials/sales/console/financials/transactions/console/financials/waived-fees/console/fleet/console/fleet/[id]/console/locations/console/locations/[id]/console/locations/franchises/[id]/console/notifications/console/people/console/people/[id]/console/reporting/console/reporting/certificate-upload/console/reporting/dps-report/console/reporting/student-records/console/reporting/student-records/[id]/console/scheduling/console/scheduling/queue
- Portal
- /(student) (every page)/checkout/dashboard/dashboard/billing/dashboard/documents/dashboard/intake/dashboard/lessons/dashboard/refer