AddThisFeature

Windowed Grid Primitive

Keep very large tables and grids responsive by rendering only the cells currently on screen.

involved Front-End Performance

What it adds

A two-dimensional windowing layer that renders visible rows and columns while preserving normal table semantics and navigation.

What your agent is told to do

5
  1. 1

    Identify the surfaces that genuinely need windowing — thousands of rows, or wide column sets rendered at once — and leave the rest alone. A list of forty rows is slower to window than to render.

  2. 2

    Support rows and columns of differing sizes by estimating first and correcting once measured, and cache the measurements so scrolling back does not re-measure and jump.

  3. 3

    Keep keyboard focus stable when the focused cell scrolls out of the window. Either keep that cell mounted or move focus deliberately to a known position; never let it fall back to the document body.

  4. 4

    Restore scroll position by the identity of the item that was at the top, not by a pixel offset, because a pixel offset points somewhere else as soon as sizes or filters change.

  5. 5

    Publish the true row and column counts and each cell's real position to assistive technology, so the grid announces a cell as one of ninety thousand rather than one of the forty currently rendered. Memoisation of the cell renderer belongs to the Render Stability Guardrails brief; this brief owns which cells exist, not how cheaply each one re-renders.

Edge cases it handles

7
  • Variable row heights and column widths must be handled, not assumed away. A grid built on a fixed row height will misplace every item below the first row that wraps to two lines.
  • Focus must survive scrolling and data updates. A user tabbing through cells who is thrown to the top of the document has lost their place and, with a screen reader, their context entirely.
  • Scroll restoration has to land on the same record after a reload or a return from a detail view. Restoring to a stored pixel offset after the data changed puts the user in an arbitrary part of the grid.
  • Assistive technology must be given the grid's real structure. Without explicit counts and positions it reports only the rendered window, which makes the grid unnavigable.
  • Find-in-page, select-all, and copy only reach rendered cells. Provide an explicit export or copy path for the full dataset and say so, rather than letting users think they copied everything.
  • Resizing the window, resizing a column, or toggling density mid-scroll invalidates cached measurements and must trigger a recalculation that keeps the current top item in place.
  • Sticky headers and frozen columns must share the same scroll arithmetic as the body, or they drift apart by a row at speed.

Definition of done

9
  • Only cells within and just beyond the viewport are rendered, at any scroll position.
  • Rows and columns of differing sizes render in the correct positions with no drift or jumping.
  • Keyboard focus remains on a known cell through scrolling, filtering, and data updates.
  • Scroll position restores to the same record after a reload or a return to the view.
  • Assistive technology reports the full row and column counts and each cell's true position.
  • Sticky headers and frozen columns stay aligned with the body during fast scrolling.
  • There is an explicit path to copy or export the full dataset rather than only the rendered window.
  • 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.