Sticky header
A sticky header is a heading row that stays pinned to the top of its scroll area while the content scrolls under it, so people always see which group or column they are in. Its risk is what slides underneath: a checkbox half under the header can still take focus while nobody can see it. Meadowstack's kit fades such controls out just before the header and takes them out of the way until they scroll clear.
By Bohuslav PoláčekChecked
@utility sticky-retire {
@supports (animation-timeline: view()) {
animation:
sticky-retire-fade linear,
sticky-retire-hide linear;
animation-timeline: view(block 0px auto), view(block 0px auto);
animation-range:
exit calc(-1 * (var(--sticky-h, 2.25rem) + 4px)) exit calc(-1 * var(--sticky-h, 2.25rem)),
exit calc(-1 * var(--sticky-h, 2.25rem)) exit 100%;Why it matters in a business app
Long lists in business apps are grouped: invoices by state, deliveries by day, tasks by person. A sticky group header tells you that the row you are looking at is still under "Overdue". The top bar of the screen does the same for the page title and its actions.
The catch is the row's own controls. A checkbox or a picker passing under a header is half visible and still hit-testable, so a click meant for the header lands on a row, and keyboard focus can sit on a control nobody sees. WCAG 2.2 added 2.4.11 Focus Not Obscured (Minimum) at level AA for exactly this.
How Meadowstack handles it
- One scroll. The page never scrolls; exactly one region does, a
ScrollArea, so a header stuck to it stays put. - Scroll padding. Grouped lists with sticky headers set
scroll-pt-10, the 36px header plus 4px, so a focused control andscrollIntoViewland just below it. - Retiring controls. Each picker slot in such rows gets
sticky-retire: it fades over its last 4px before the header and leaves the hit area while the header covers it. Text only hides, it never rests half faded: an axe run on a phone measured a title in that fade at 2.28:1. - Only where it is stuck. Flat lists and
DataTablegroups do not use it, or their first rows would lose their controls. - The top bar's edge. A hairline is always there and a small shadow grows over the first 24px of scroll, so the content reads as sliding under the bar.
Common mistakes
- No scroll padding. Tabbing down a list puts the focused row under the header.
- A see-through header. Rows show through, and text under text fails contrast.
- Sticky everything. A sticky filter bar, group header and column header together leave a phone with a few rows of content.
Sources
Questions
Is a sticky header an accessibility problem?
Not by itself. It becomes one when it hides the focused control: WCAG 2.2's criterion 2.4.11 asks that a focused component is not entirely hidden by author content such as a sticky header.
What happens in browsers without scroll-driven animations?
Nothing changes: the controls stay and pass under the header as they would without the utility, and the scroll padding still keeps focus clear of it.
Does the effect respect reduced motion?
Yes. It is tied to the scroll position, not to the clock, so it follows the wheel or the finger and does not count as animation that plays by itself.
Two ways
Build it yourself, or have it built
Build it yourself
Build your app on the framework
Get the codebase these apps stand on and build yours with Claude Code, Cursor or Codex.
One payment, lifetime updates
Get the frameworkHave it built
Have us build your app
Tell us how your team works. We plan the app with you and build it on the same framework at a fixed price.
After launch, Care keeps it improving, from €99 a month.
from €1,990
Describe your app