Skip to content

Components

RecordPeek: open a record without losing the list

RecordPeek opens a record in a side panel beside the list it came from, with its own address, so the list stays in view and another row swaps the record in place. The corner button grows the panel into the record's full page and back, and both show the same view.

By Bohuslav PoláčekChecked

Foldline's cutting dies with DIE-0412 open beside the list, rendered from the kit with the demo's data. The panel opens in a layer that exists only in the browser, so its frame and top bar are drawn here around the view it shows. On a narrow screen this preview shows the panel alone; the app opens the full page there.

What it is for, and what the preview shows

RecordPeek is how a record opens from a list or a board in an app built on Meadowstack: in a panel beside the list, not on a new page. The address gains ?nahled=<id>, so a reload keeps the record open and a link opens the same list with the same record; the row stays marked; another row swaps the record in place; the arrows in the panel's top bar and Alt+↑ and Alt+↓ step through the list. The corner button expands the record into its full page with a morph, and back.

The preview is the example docs/patterns.md gives: die DIE-0412 open beside the cutting dies of Foldline, a packaging printer in the demo. The panel shows what every side panel shows, in the same order: the header with the die's state, the next step with its action, the other actions, then the die's hits against its life.

The rules, and where each one lives

  • Records open beside their list first. The root AGENTS.md (Look and feel) and docs/patterns.md: RecordPeek with ?nahled=<id>, the corner button to RecordPage and back (RecordCollapseButton), one view component for both.
  • The page moves aside when there is room. On a desktop where the page keeps at least 640px, the panel moves the page aside instead of covering it, and the table hides its less important columns by its own width (docs/principles.md, Side panels); otherwise it lies over the page.
  • One order inside. One header row, then the next step, properties, actions and history: PeekHeader, NextStep, PropertyList, AuditTimeline (docs/principles.md).
  • Only one thing scrolls. With a panel open on a wide screen the page behind it locks (docs/patterns.md, AppShell), and the page itself never scrolls (AGENTS.md; the audit's page-scroll).
  • Not everywhere. Not for a record that is the main work, such as a long form, a diary or an editor; not in a worklist, which has a permanent split view; not under 1024px, where the app opens the full page (the manifest's not).

What AI coding tools write instead

The manifest's replaces lists the usual three: a hand-built side panel, drawer, sheet or slide-over; a modal that shows a record; a detail page that loses the list.

A modal covers the list the person was working through, so checking three records means opening and closing three times. A detail page loses the scroll position and the filter, and the back button has to rebuild the list. A hand-built drawer rarely has an address, so a reload closes it and a link cannot point at it; it seldom steps to the next row, gives the page room or grows into the full page, and every drawer in the app opens a little differently. RecordPeek does these once, for every list.

How to use it

The props, from its exported RecordPeekProps:

  • open and onClose: driven by the address, ?nahled=<id>.
  • title: the panel's name for screen readers; label: what the record is, small in the top bar, usually its number.
  • recordKey: changes when another record is shown, so the content fades in place and starts at the top.
  • onExpand and expandHref: the corner button; navigate with View Transitions and the panel morphs into the page, and the address makes the button a link that Cmd+click opens in a new tab.
  • onPrevious and onNext: the arrows and Alt+↑ and Alt+↓; undefined at either end of the list.
  • size: "default" (32rem) for a record of properties and history, "wide" (44rem) for one whose content is a table, "xwide" (60rem) for a document beside its fields.
  • children: the record's view, the same component its full page renders.

In the list, give DataTable onRowClick and activeRowId, so the open row stays marked. The pattern behind it is the record side panel, and the record pattern shows the full page the panel grows into.

Its entry in the manifest

The component's rules as the kit's manifest states them, the same entry an AI coding tool reads.Read from the kit's component manifest when the site was built (126 components, packages/kit/src/components.json); the same entry answers an AI coding tool through the kit's MCP server.

Where it runs in the example apps

The example apps whose code renders RecordPeek, and in which modules, read from the demo's source.Read from the demo's source when the site was built: 9 of 9 example apps render <RecordPeek>, in the modules named here as each app's sidebar names them.

How Foldline opens a die

apps/demo/src/modules/tooling/components/die-peek.tsx
<RecordPeek
  open={open}
  onClose={onClose}
  title={die ? `${die.product}, ${die.number}` : tx("Nástroj", "Die")}
  label={die?.number}
  recordKey={id}
  // fromPeek: the page's "Zobrazit vedle seznamu" steps back to this list as it was.
  onExpand={() => navigate(fullPage, { viewTransition: true, state: { fromPeek: true } })}
  expandHref={expandHref}
  onPrevious={onPrevious}
  onNext={onNext}
>
  <DieRecordState record={record} variant="peek" onSaved={onChange} />
</RecordPeek>
The panel's name and label from the die once it has loaded, the full page's address for the corner button, previous and next from the list, and the one view component the full page renders too.

Questions

Why open a record beside the list and not on its own page?

Because people work through lists: open one, check it, move to the next. Beside the list the row stays in view, the next record is one click or one shortcut away, and the full page is still one button away.

Does the open record have its own address?

Yes. The list's address gains the record's id as a query parameter, so a reload keeps it open and a link opens the same list with the same record.

What happens on a phone?

Under 1024px the app opens the record's full page instead of a panel, with the same view inside.

When should a record not open in a side panel?

When the record is the main work, such as a long form, a diary or an editor, and in a worklist, which keeps a permanent split view of its own.

How does the panel fit beside the list on a laptop?

With room, it moves the page aside and the table hides its less important columns by its own width. Without room, it lies over the page.

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 framework
  • Have 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