Ocean Sticky Header Table
Scrollable table whose header stays pinned, with an ocean scrollbar thumb.
- lines of CSS
- 40lines of CSS
- dependencies
- 0dependencies
- baseline browsers
- Newlybaseline browsers
- no motion at all
- Noneno motion at all
| Account | MRR |
|---|---|
| Acme Corp | $2,400 |
| Globex | $960 |
| Initech | $180 |
| Umbrella | $2,010 |
| Soylent | $780 |
| Stark | $8,400 |
Vue, Svelte, styled-components and Tailwind exports are part of Pro. HTML, CSS and React are free forever.
.fx-tb-sticky-ocean-6776 {
width: 300px;
max-height: 160px;
overflow-y: auto;
border-radius: 0.7rem;
border: 1px solid rgba(255,255,255,0.08);
background: #0f172a;
scrollbar-width: thin;
scrollbar-color: #0ea5e9 transparent;
}
.fx-tb-sticky-ocean-6776 table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
font-size: 0.8rem;
color: #e2e8f0;
}
.fx-tb-sticky-ocean-6776 th {
position: sticky;
top: 0;
z-index: 1;
padding: 0.55rem 0.8rem;
text-align: left;
font-size: 0.68rem;
letter-spacing: 0.05em;
text-transform: uppercase;
color: #94a3b8;
background: #131c31;
box-shadow: inset 0 -1px 0 rgba(14,165,233, 0.5);
}
.fx-tb-sticky-ocean-6776 td {
padding: 0.5rem 0.8rem;
border-top: 1px solid rgba(255,255,255,0.05);
}
.fx-tb-sticky-ocean-6776 td:last-child { text-align: right; font-variant-numeric: tabular-nums; color: #6366f1; }
.fx-tb-sticky-ocean-6776::-webkit-scrollbar { width: 6px; }
.fx-tb-sticky-ocean-6776::-webkit-scrollbar-thumb {
border-radius: 3px;
background: linear-gradient(#0ea5e9, #6366f1);
}<div class="fx-tb-sticky-ocean-6776">
<table>
<thead>
<tr>
<th>Account</th>
<th>MRR</th>
</tr>
</thead>
<tbody>
<tr>
<td>Acme Corp</td>
<td>$2,400</td>
</tr>
<tr>
<td>Globex</td>
<td>$960</td>
</tr>
<tr>
<td>Initech</td>
<td>$180</td>
</tr>
<tr>
<td>Umbrella</td>
<td>$2,010</td>
</tr>
<tr>
<td>Soylent</td>
<td>$780</td>
</tr>
<tr>
<td>Stark</td>
<td>$8,400</td>
</tr>
</tbody>
</table>
</div>What do I do with this?
- Put
ocean-sticky-header-table-6777.cssanywhere your page already loads CSS from — in Next.js that isapp/globals.css, or any stylesheet with a<link>in your HTML. - Then put the class on the element you want it on:
<button class="fx-tb-sticky-ocean-6776">. The CSS does nothing until a class name in it matches something on the page.
- Link the stylesheet, then paste the markup wherever you need it.
npx hoverlab add ocean-sticky-header-table-6777What's included
- The markup and the stylesheet, in whichever framework you pick
- No runtime dependencies
Works with
- React
- Vue
- Svelte
- Tailwind
- styled-components
- Plain CSS
npx hoverlab add ocean-sticky-header-table-6777
Or over MCP, from your editor's agent — no account needed.
License
Free to read, copy and install, for personal and non-commercial projects. Shipping it in client work or a paid product needs Pro ($79 once). The source lands in your repo and stops being ours — no attribution, nothing to upgrade.
Motion safety
Static estimate, read from the CSS
- Reduced motion
- Nothing animates
No animation or transition, so there is nothing to switch off.
- What it animates
- Nothing
No property is animated.
- Flashing (WCAG 2.3.1)
- No flashing found
No repeating change in opacity, colour or brightness large enough to count as a flash.
- Layout shift (CLS)
- No shift expected
Nothing it animates moves or resizes the box in flow. A category from the CSS, not a measurement for this effect.
Every row is read from the shipped CSS. Only a figure marked measured came from a browser. Customizing the speed changes the timing, so recheck a customized copy. How it is computed
33 more effects in Tables & Data Grids
All of them free to read, copy and install — no account, no locked tiles, no watermarked preview. The whole catalog is open, and so are the API and the CLI.
Browse Tables & Data GridsShipping one commercially
Copying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.
- A commercial licence for everything in the catalog
- Unlimited bundle exports, in Vue, Svelte and Tailwind
- One payment — no subscription, nothing to renew
7 variations of Ocean Sticky Header Table
Finished looks, each one a position in the customizer above. Copy any of them, or open it and keep moving the sliders.