AddThisFeature

Frozen Table Columns

Keep key identifiers visible while users scroll across wide data tables.

moderate Data & Content

What it adds

Sticky leading or trailing columns that stay in place during horizontal scroll on a wide table.

What your agent is told to do

6
  1. 1

    Compute each frozen column's offset from the measured widths of the columns before it, not from hardcoded numbers. One content change and fixed offsets are wrong.

  2. 2

    Recompute offsets when column widths change — on resize, on column show or hide, on font load, and after data changes cell widths.

  3. 3

    Define one explicit layer order for frozen cells, frozen headers, the sticky header row, row hover and selection states, and any menu opened from a frozen cell. Ad-hoc z-index values are where this feature usually breaks.

  4. 4

    Keep header and body cell widths in sync from a single source of truth; two independently sized tables will never stay aligned.

  5. 5

    Do not freeze more than a couple of columns, and disable freezing entirely when the frozen set would exceed roughly half the viewport width — the user is left with no scrollable area.

  6. 6

    The small-screen strategy — which columns survive and the collapse to stacked cards — is owned by Responsive Data Tables; defer to it rather than defining a second mobile behaviour.

Edge cases it handles

6
  • A shadow or border marking the frozen boundary must appear only while there is content scrolled underneath it.
  • Virtualized rows must apply the same offsets as rendered rows, including rows recycled during fast scrolling.
  • Row selection and hover backgrounds must cover frozen cells too, or the frozen column looks detached from its row.
  • Menus and tooltips opened from a frozen cell must escape the scroll container rather than being clipped by it.
  • Right-to-left layouts freeze from the opposite edge — do not assume the left.
  • Keyboard navigation into a non-frozen cell must scroll it into view without hiding it behind a frozen column.

Definition of done

8
  • Multiple frozen columns align correctly at every scroll position.
  • Offsets recompute on resize, column visibility changes, and font load.
  • One documented layer order covers frozen cells, headers, hover, selection, and menus.
  • Header and body widths stay synchronized during resizing.
  • Freezing disables itself when it would leave too little scrollable width.
  • Mobile behaviour is delegated to Responsive Data Tables.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.