A scrollbar thumb with a body that also navigates: markers tick the rail, a position tile names the row or date under it, and fast arrivals squash it against the rail.
Scroll insideScroll inside
Audit log
3,000 events · last 30 days5 denied
TimeActorEventResult
Nov 2, 13:55User 15Changed role to EditorOKUser 15 · Nov 2, 13:55
Nov 2, 13:47Service keyUpdated invoice INV-1042OKService key · Nov 2, 13:47
Nov 2, 13:26User 02Created API keyOKUser 02 · Nov 2, 13:26
Nov 2, 13:18User 15Exported report Q3OKUser 15 · Nov 2, 13:18
Nov 2, 13:01Service keySigned inOKService key · Nov 2, 13:01
Nov 2, 12:49User 02Changed role to EditorOKUser 02 · Nov 2, 12:49
Nov 2, 12:32User 15Updated invoice INV-1042OKUser 15 · Nov 2, 12:32
Nov 2, 12:20User 19Deleted draftOKUser 19 · Nov 2, 12:20
Nov 2, 12:03User 02Changed role to EditorOKUser 02 · Nov 2, 12:03
Nov 2, 11:55User 15Updated invoice INV-1042OKUser 15 · Nov 2, 11:55
Nov 2, 11:34User 19Created API keyOKUser 19 · Nov 2, 11:34
Nov 2, 11:26User 02Exported report Q3OKUser 02 · Nov 2, 11:26
Nov 2, 11:09User 15Signed inOKUser 15 · Nov 2, 11:09
Nov 2, 10:57User 19Changed role to EditorOKUser 19 · Nov 2, 10:57
Nov 2, 10:40User 02Updated invoice INV-1042OKUser 02 · Nov 2, 10:40
Nov 2, 10:28User 07Deleted draftOKUser 07 · Nov 2, 10:28
Nov 2, 10:11User 19Changed role to EditorOKUser 19 · Nov 2, 10:11
Nov 2, 10:03User 02Updated invoice INV-1042OKUser 02 · Nov 2, 10:03
Nov 2, 09:42User 07Created API keyOKUser 07 · Nov 2, 09:42
Nov 2, 09:34User 19Exported report Q3OKUser 19 · Nov 2, 09:34
Nov 2, 09:22User 11Deleted draftOKUser 11 · Nov 2, 09:22
Nov 2, 09:05User 07Changed role to EditorOKUser 07 · Nov 2, 09:05
Nov 2, 08:48User 19Updated invoice INV-1042OKUser 19 · Nov 2, 08:48
Nov 2, 08:36User 11Deleted draftOKUser 11 · Nov 2, 08:36
Nov 2, 08:19User 07Changed role to EditorOKUser 07 · Nov 2, 08:19
Nov 2, 08:11User 19Updated invoice INV-1042OKUser 19 · Nov 2, 08:11
Nov 2, 07:50User 11Created API keyOKUser 11 · Nov 2, 07:50
Nov 2, 07:42User 07Exported report Q3OKUser 07 · Nov 2, 07:42
Nov 2, 07:30User 04Deleted draftOKUser 04 · Nov 2, 07:30
Nov 2, 07:13User 11Changed role to EditorOKUser 11 · Nov 2, 07:13
1
squash-thumb · , lively
squash-thumb-demo.tsx
When to use
Use for long lists people navigate: markers tick the rail, a tile names the row or date, and clicking the rail jumps. It can virtualize rows. Fast arrivals squash the thumb.
When not to use
Not for short lists, where the native scrollbar is enough. For page reading progress use Scroll Progress.
Use Squash Thumb for long lists people navigate: audit logs, inboxes, build output, tables with thousands of rows. It does what a native scrollbar cannot: markers tick the rail where the errors, unread messages or search hits are, and a position tile beside the thumb says where you are in your own words ("Oct 14, 09:12", "Denied · Oct 14, 09:12" when the thumb is on a marker). Hover the thumb and the tile appears and the thumb widens to say it can be held; grab it and it becomes a primary tile you scrub with. Click the rail to jump there, landing on the nearest marker. jumpLabel adds a "back to top" button once the list is a screen away. The thumb has a body too: its speed stretches it, and a fast arrival at either end squashes it against the rail, so the end is felt, not searched for. Scrolling stays native: wheel, trackpad inertia, touch, keyboard and screen readers work as in any overflow: auto box. For short panels that rarely scroll, a plain scroll area is enough.
Give the root a height. With renderRow, rowCount and rowHeight the area virtualizes its rows (only the visible ones and a few around them are in the DOM). Without them, pass any content as children; rowCount alone still lets the tile count rows, and with neither the tile shows a percentage. formatPosition changes its text, for example to the row's date.
A marker's at is a row index when rowCount is set, otherwise a fraction of the list (0 to 1). Its tone is destructive (default), primary or muted; keep to one or two tones and a handful of markers so they read as signals.
The root sets --squash-thumb-lane to the 32 px gutter: pad your rows on the right by it (pr-(--squash-thumb-lane)) so the thumb never passes over text. The position tile floats over the rows while it shows. viewportRef and onScroll reach the native scroller.
Since this version the lane no longer reserves room for the tile (it is the gutter only), so rows get more width; the tile overlays them while visible.
Presets: rail (default, pill thumb, "1,204 / 3,000"), compact (pill thumb, "1,204", for narrow lists) and bead (a 12 px ball that grows to 24 px when held). thumb replaces the drawn piece with a tile or any SVG path.
Set the character for the whole app with MotionKitProvider, or per instance with temperament (calm, lively, playful). It changes motion intensity only, never the drawing.
The default demo: 3,000 virtualized events of a workspace's audit log, with the five denied sign-ins ticked in red on the rail. Hover or drag the thumb to read the date, click a red tick to land on the denied event, and use "Back to newest" to return.
Scroll insideScroll inside
Audit log
3,000 events · last 30 days5 denied
TimeActorEventResult
Nov 2, 13:55User 15Changed role to EditorOKUser 15 · Nov 2, 13:55
Nov 2, 13:47Service keyUpdated invoice INV-1042OKService key · Nov 2, 13:47
Nov 2, 13:26User 02Created API keyOKUser 02 · Nov 2, 13:26
Nov 2, 13:18User 15Exported report Q3OKUser 15 · Nov 2, 13:18
Nov 2, 13:01Service keySigned inOKService key · Nov 2, 13:01
Nov 2, 12:49User 02Changed role to EditorOKUser 02 · Nov 2, 12:49
Nov 2, 12:32User 15Updated invoice INV-1042OKUser 15 · Nov 2, 12:32
Nov 2, 12:20User 19Deleted draftOKUser 19 · Nov 2, 12:20
Nov 2, 12:03User 02Changed role to EditorOKUser 02 · Nov 2, 12:03
Nov 2, 11:55User 15Updated invoice INV-1042OKUser 15 · Nov 2, 11:55
Nov 2, 11:34User 19Created API keyOKUser 19 · Nov 2, 11:34
Nov 2, 11:26User 02Exported report Q3OKUser 02 · Nov 2, 11:26
Nov 2, 11:09User 15Signed inOKUser 15 · Nov 2, 11:09
Nov 2, 10:57User 19Changed role to EditorOKUser 19 · Nov 2, 10:57
Nov 2, 10:40User 02Updated invoice INV-1042OKUser 02 · Nov 2, 10:40
Nov 2, 10:28User 07Deleted draftOKUser 07 · Nov 2, 10:28
Nov 2, 10:11User 19Changed role to EditorOKUser 19 · Nov 2, 10:11
Nov 2, 10:03User 02Updated invoice INV-1042OKUser 02 · Nov 2, 10:03
Nov 2, 09:42User 07Created API keyOKUser 07 · Nov 2, 09:42
Nov 2, 09:34User 19Exported report Q3OKUser 19 · Nov 2, 09:34
Nov 2, 09:22User 11Deleted draftOKUser 11 · Nov 2, 09:22
Nov 2, 09:05User 07Changed role to EditorOKUser 07 · Nov 2, 09:05
Nov 2, 08:48User 19Updated invoice INV-1042OKUser 19 · Nov 2, 08:48
Nov 2, 08:36User 11Deleted draftOKUser 11 · Nov 2, 08:36
Nov 2, 08:19User 07Changed role to EditorOKUser 07 · Nov 2, 08:19
Nov 2, 08:11User 19Updated invoice INV-1042OKUser 19 · Nov 2, 08:11
Nov 2, 07:50User 11Created API keyOKUser 11 · Nov 2, 07:50
Nov 2, 07:42User 07Exported report Q3OKUser 07 · Nov 2, 07:42
Nov 2, 07:30User 04Deleted draftOKUser 04 · Nov 2, 07:30
Nov 2, 07:13User 11Changed role to EditorOKUser 11 · Nov 2, 07:13
The scroller is a native region with aria-label and tabIndex={0}, so it can be scrolled with the keyboard. Its focus shows a 2 px inset ring.
The rail, the thumb and the row tile are aria-hidden: they repeat what the native scroll position already says.
Virtualized rows are a list whose items carry aria-setsize and aria-posinset.
A polite live region says "End of list" or "Top of list" when an end is reached, and "Row 1,204 of 3,000" when a drag is released.
Keyboard scrolls inside the region bring up the position tile for a moment, so keyboard users read the same position as pointer users. Markers are a visual overview: give the marked rows their own text too (the demo says "Denied" in the row).
The back-to-top button is a real button, inert while hidden; activating it moves focus to the list.
Touch: drag the thumb (it does not pan the page), tap the rail to jump, or swipe the list natively.
The thumb uses muted-foreground on a muted rail (at least 3:1 as a non-text element); the held tile uses primary with a rim light and a shadow tinted with its colour.
No spring, stretch or squash: the thumb follows the position directly, rail clicks and the back-to-top button jump instantly, and the position tile appears with a short fade.
The thumb is one SVG path redrawn with real radii; the row tile moves by transform on its own layer.
One requestAnimationFrame loop runs while the thumb moves and stops as soon as it is still; scrolling itself stays native and passive.
The end is detected from scrollTop reaching 0 or its maximum, never from overscroll events, so trackpad inertia and the keyboard behave the same.
Technical sheet
Motion
calm
260 ms · bounce 0
lively
400 ms · bounce 0.3
playful
540 ms · bounce 0.45
Main spring of each temperament. Set it with the temperament prop or MotionKitProvider; the default is lively.
Size
Not measured yet · budget 15.0 kB gzip
Component and MotionKit helpers; excludes react, react-dom.
Dependencies
motion
Triggers
scroll, drag, press
Reduced motion
No spring, stretch or squash: the thumb follows the position directly, rail clicks and the back-to-top button jump instantly, and the position tile appears with a short fade.
Keyboard
Tab
Focuses the scroll region (and the back-to-top button once it shows)
Arrow Up / Arrow Down, Page Up / Page Down, Space
Scroll the list natively; the thumb follows and the position tile shows where you are
Home / End
Jump to the top or the end; the fast arrival squashes the thumb against the rail
Enter / Space on Back to top
Returns to the top and moves focus to the list
Browsers
Last 2 versions of Chrome, Edge, Firefox and Safari (iOS 16.4+)