The record side panel
In Meadowstack a record opens from its list in a side panel first (`RecordPeek`), its id in the address, and a corner button grows it into the full record page and back. Panel and page render the same view component, so they never drift apart, and with the panel open the table hides its less important columns by its own width instead of scrolling sideways.
By Bohuslav PoláčekChecked
const listWithPeek = requestsPath(`?${params.preview}=${id}`);
const collapseHref = useHref(listWithPeek);
const fromPeek = (location.state as { fromPeek?: boolean } | null)?.fromPeek === true;
return (
// The record screen fills the panel; RecordPage marks it for the morph from and to the side panel.
<RecordPage className="flex min-h-0 flex-1 flex-col">
<RequestRecordState
record={record}
variant="page"
collapse={
<RecordCollapseButton
// On a phone the panel is a full-screen sheet and the top bar already leads back.
className="max-sm:hidden"
href={collapseHref}
onCollapse={() => (fromPeek ? navigate(-1) : navigate(listWithPeek, { viewTransition: true }))}
/>
}
errorAction={
<Button size="sm" asChild>
<Link to={requestsPath()}>Back to purchase requests</Link>
</Button>
}
onDeleted={() => navigate(requestsPath(), { replace: true })}
/>
</RecordPage>The flow, step by step
- Click a row. The record slides in beside the list and its id goes into the address:
?preview=<id>in the starter,?nahled=<id>in the demo. With room, the panel moves the page aside instead of covering it, and the list keeps its filters, scroll and selection. - Click another row. The record swaps in place. Opening the panel adds one step to the browser's history and swapping replaces it, so Back leaves the panel instead of replaying every record looked at.
- Step through. Alt+ArrowUp and Alt+ArrowDown, or the panel's arrows, open the previous and next row in the order on screen: filtered, sorted, paged. At the ends of the list, or when a filter hid the open record, the arrows go away.
- Grow into the page. The corner button expands the panel into the full record page as one element morphing into another. The record stays on screen the whole time: the page opens with the copy the panel last showed while a fresh one loads, so no skeleton flashes between them.
- Back to the list. The page's corner button collapses it again. When the person came from the panel it steps back in history, and the list returns with its filters and scroll as they were.
- Share it. A link or a reload opens the same record beside the same filtered list, and the full page has an address of its own.
- On a phone. The record opens as a full-screen sheet with the decision first. The top bar already leads back, so the page hides its collapse button, and the table shows only its main columns with the other values folded into them (
CellStack).
A list with a reading pane opens with its most interesting record already in the panel: the demo's PreselectParam (shared/preselect.tsx) writes it into the address once, and never on a phone.
The rules and where each one is enforced
| Rule | Where it is enforced |
|---|---|
| A record opens beside its list first | a rule in the root AGENTS.md; the kit's RecordPeek, whose manifest entry names what it replaces: a hand-built drawer, a modal, a detail page that loses the list |
| Panel and page are one view | one component with variant "peek" or "page" (RequestRecordState in the starter), wrapped in RecordPeek or RecordPage |
| The open record is in the address | ?preview=<id> and ?nahled=<id> (.claude/rules/apps.md); e2e "a request opens beside the list, steps through it and grows into its page" |
| The table never scrolls sideways | meta: { hideOnMobile: true } on the optional columns and CellStack for their values; the audit's horizontal-overflow and table-scroll rules in docs/audit.md; the starter's phone e2e |
| Only one thing scrolls | AppShell locks the page behind an open panel on a wide screen |
| The panel and the page morph, they do not swap | RecordPage and markRecordMorph (View Transitions on the kit's ease-morph curve) |
| Previous and next follow the rows people see | peekSteps() in shared/peek.ts, fed by the table's onVisibleRowsChange |
What AI coding tools build instead
- A modal for every record. It covers the list, has no address, and Back does not close it. People lose their place every time they look something up.
- A detail page that loses the list. A click navigates away, and coming back resets the filters and the scroll, so working through twenty records is twenty round trips.
- A separate drawer component. The drawer shows a cut-down copy of the page, written twice, and the two drift: a field added to the page never reaches the drawer. Here one view takes a
variant. - The open record kept only in component state. A reload or a shared link shows the bare list. Here the id is in the address.
- Columns hidden by the window's width. Media queries do not know a panel took half the screen, so the table scrolls sideways beside it. The kit's table hides its optional columns by its own width.
- A spinner between panel and page. Expanding loads the record again and flashes a skeleton. Here the page starts from the copy the panel showed.
Where to see it
- Document inbox: a document opens beside the list, the most interesting one already open, and grows into its page.
- Order record: the full record page a panel grows into.
- The kit's RecordPeek and DataTable, the record screen the panel grows into and the list it opens from.
Example apps that open records beside a list
| Example app | Modules that render it |
|---|---|
| An app for a packaging and print company | Jobs, Quotes, Cutting dies, Colour |
| An app for a studio or agency | Capacity, Tasks, Finance |
| An app for a haulage company | Freight, Drivers, Costs |
| An app for a roastery with an online shop | Roasting, Green coffee, Shop, Wholesale |
| An app for a sports club | Courts, Club, Coaching, Rentals |
| An app for a construction company | Sites, Schedule, Crews, Machines, Site diary, Drawings, Foreman's phone, Budget |
| An app for an accounting office | Documents, Bookkeeping, Official mail |
| An app for restaurants and venues | Shifts, Kitchen, Food safety, People |
| An app for one person | Brand deals, Content, Money, Training |
The panel on the list
const record = useRequestRecord(id, version);
const request = record.resource.status === "success" ? record.resource.data.request : null;
return (
<RecordPeek
open={open}
onClose={onClose}
title={request ? `${request.title}, ${request.number}` : "Purchase request"}
label={request?.number}
recordKey={id}
// fromPeek: the page's collapse button steps back to this list as it was.
onExpand={() => navigate(fullPage, { viewTransition: true, state: { fromPeek: true } })}
expandHref={expandHref}
onPrevious={onPrevious}
onNext={onNext}
>
<RequestRecordState
record={record}
variant="peek"
onSaved={onSaved}
onDeleted={() => {
onClose();
onSaved();
}}
/>
</RecordPeek>Questions
Should a record open in a modal or in a side panel?
In a side panel beside its list when people move between records: the list stays in view, the address names the record, and Back and reload behave. A modal suits a short question, not a record people read and act on.
What happens to the table when the panel opens?
With room, the panel moves the page aside, and the table hides its less important columns by its own width, so it never scrolls sideways. On a phone the record opens full screen and the table folds the hidden values into its visible cells.
Can I link to a record that is open in the side panel?
Yes. The open record is in the address, so a link or a reload opens the same record beside the same filtered list. The full record page has its own address too.
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 queue people work through, where the worklist screen keeps a permanent split view.
Are the panel and the full page two components?
No. Both render the same view with a variant, so a field added to one appears in the other, and the panel morphs into the page with the record on screen in both.
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