About this set
A scrolling list of top pages whose header row stays pinned while the body scrolls under it. The table lives in a box with a 330 pixel max-height and overflow:auto, and each header cell has position:sticky with top:0 and a white background. The table uses border-collapse:separate with zero spacing, which keeps the header’s bottom border attached while it sticks; with collapsed borders the line would scroll away. The first column holds the page path as a row header, numbers use tabular figures so they line up, and a purple tag shows the traffic source. Use it for long lists inside dashboards and cards where the page itself should not scroll: analytics tables, logs and search results. The scroll box is a region with an aria-label and tabindex=”0″, so keyboard users can focus it and scroll with the arrow keys, and it also scrolls sideways on phones. No JavaScript is involved. The Bootstrap version puts .sticky-top on the thead inside an .overflow-auto box, and the Tailwind version uses sticky top-0 on the header cells.
What’s included
- Header row pinned with position:sticky, no JavaScript
- border-collapse:separate so the header border sticks too
- Tabular numerals for aligned figures
- Focusable, labelled scroll box for keyboard scrolling
- Bootstrap .sticky-top and Tailwind sticky top-0 versions
Accessibility
The table is labelled by its heading and uses scope on column and row headers. The scroll box is a named region with tabindex="0" and a 2px purple focus outline, so it can be scrolled from the keyboard. Header and body text meet 4.5:1 contrast.
Customise it
Change max-height on .sh-scroll for the visible height, and the colours in the .sh rules (header text #686280, hover #faf8fd, tag #efeaff and #6d28d9). Bootstrap uses --bs-table-* variables on .sh; in Tailwind edit max-h-[330px] and the colour utilities.




















