Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-record-peek.json --yes

Record peek

Pro

A list whose record opens in a card beside the item that opened it, for React and Tailwind CSS. Part of Goop Pro.

Press a task to open it over the list’s end, or choose Push to open it beside the list as the list narrows, keeping whole columns; another row swaps it; step with the panel’s arrows, ↑ ↓ or J K, drag its edge, mark it done, open its full page and come back; Escape closes it and puts the focus back on the row. The line under the box says which task was opened or stepped to. The tasks and the full page are the example’s own: a real app keeps the open record in the URL with useRecordPeek and links its full page with href.

When to use

  • A list whose record opens in a card beside the item that opened it.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Record peek on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-record-peek.json --yes
PROMPT
Add the Goop Record peek to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { RecordPeekFooter, useRecordPeek } from '@/components/goop/patterns/record-peek';

import { useState } from 'react';
import { WeekBoardItem } from '@/components/ui/goop/week-board';
import {
  RecordPeek,
  RecordPeekBody,
  RecordPeekHeader,
  RecordPeekItem,
  RecordPeekList,
  RecordPeekPanel,
  RecordPeekGroup,
  RecordPeekTrigger,
} from '@/components/goop/patterns/record-peek';

const EVENTS = [
  { id: 'hedge', time: '10:00', title: 'Hedge planting' },
  { id: 'barn', time: '14:00', title: 'Barn meeting' },
];

function DayEvents() {
  const [id, setId] = useState<string | null>(null);
  const event = EVENTS.find((e) => e.id === id);
  return (
    <RecordPeek
      open={id !== null}
      onOpenChange={(open) => open || setId(null)}
      records={EVENTS.map((e) => e.id)}
      value={id}
      onValueChange={setId}
      href={`/events/${id}`}
    >
      <RecordPeekList className="gap-1">
        {EVENTS.map((e) => (
          <RecordPeekItem key={e.id} value={e.id}>
            <RecordPeekTrigger asChild>
              <WeekBoardItem time={e.time} title={e.title} />
            </RecordPeekTrigger>
          </RecordPeekItem>
        ))}
      </RecordPeekList>
      <RecordPeekPanel>
        <RecordPeekHeader title={event?.title} description="By the north hedge" />
        <RecordPeekBody>
          <RecordPeekGroup icon="tabler-outline:clock">{event?.time}</RecordPeekGroup>
        </RecordPeekBody>
      </RecordPeekPanel>
    </RecordPeek>
  );
}
  • Fits: list, schedule (their recipes).
  • Put it round the list whose items open records (a week of events, a list of to-dos): each item a RecordPeekItem, the item's own control (a WeekBoardItem, a row's title) lent to a RecordPeekTrigger with asChild. Keep the open id in state (value / onValueChange) when the page needs it; the card's words are the record's own, in RecordPeekGroups with the theme's icons in their gutter.
  • height, width, padding, gap, corner, border, background, text, motion: add no class for these.

API reference

  • Each option with its sentence: record-peek--options.md
  • State: open (open / defaultOpen / onOpenChange); value (value / defaultValue / onValueChange); drawn by data-dragging, data-state=open
  • Types: RecordPeekAdapter = { get(): string | null; set(id: string | null, how: 'push' | 'replace'): void; back?(): boolean; subscribe?(listener: () => void): () => void }
Parts
PartWhat it is
RecordPeekListThe list's region
RecordPeekItemOne record's box; its props: record-peek--item.md
RecordPeekTriggerThe control that opens its item's record (the record's name, or the whole of an event's card), a button by default (asChild for the caller's own control: it keeps its look and slot, marked data-record-peek-trigger); its props: record-peek--trigger.md
RecordPeekPanelThe open record's card; its props: record-peek--panel.md
RecordPeekHeaderThe card's head; its props: record-peek--header.md
RecordPeekBodyThe record
RecordPeekGroupOne section of the record (its people, its place, its time); its props: record-peek--group.md
RecordPeekFooterThe card's foot
useRecordPeekThe open record in the URL

RecordPeekGroup

One section of the record (its people, its place, its time).

TSX
import { RecordPeekGroup } from '@/components/goop/patterns/record-peek';

Options

  • icon?: IconName — The section's mark in the gutter: a pack icon's name (tabler-outline:clock).

RecordPeekItem

One record's box.

TSX
import { RecordPeekItem } from '@/components/goop/patterns/record-peek';

Options

  • value: string — The record's id: what the root's value holds while it is open.
  • Also takes: asChild?: boolean

RecordPeek: every option

TSX
import { RecordPeek } from '@/components/goop/patterns/record-peek';

Options

  • arrangement?: RecordPeekArrangement — The contract's arrangement (the catalogue's ids): Meadow draws anchored alone, every other id as it.
  • open?: boolean — Whether the record is open, when the caller holds it (with onOpenChange).
  • defaultOpen?: boolean = false — Whether it is open at first, when the root holds it.
  • onOpenChange?: (open: boolean) => void — Hears every open and close: a trigger, the close button, Escape, a press outside the card.
  • mode?: 'peek' | 'page' = 'peek' — peek: the record opens in the card beside its item.
  • layout?: 'push' | 'overlay' = 'overlay' — Trail's two forms, taken so code written for either theme runs on both: Meadow's card always floats beside its item over the list (overlay, the default); push, where Trail narrows the list beside its panel, draws the same card, the list keeping its whole width under it.
  • onOpenRecord?: (id: string) => void — Opens the record a trigger was pressed for: useRecordPeek's open.
  • records?: readonly string[] — The records' ids in the list's order, for previous and next (with value and onValueChange).
  • value?: string | null — The open record's id among records, when the caller holds it (null for none).
  • defaultValue?: string | null — The open record's id at first, when the root holds it: given (null for none), the root keeps the open record itself as triggers open it and previous and next step, telling onValueChange.
  • onValueChange?: (value: string | null) => void — Called with the record a trigger opened or previous, next, ↑ ↓ or K J stepped to.
  • onPrevious?: () => void — Steps to the previous record, where the caller steps itself (leave it out at the first: disabled).
  • onNext?: () => void — Steps to the next record, where the caller steps itself (leave it out at the last: disabled).
  • href?: string — The open record's full page: "Open full page" is a link to it (⌘ Enter too).
  • onExpand?: () => void | Promise<void> — Opens the full page with your router; with an href too, the link keeps its new-tab clicks.
  • storageKey?: string — The local-storage key that keeps a dragged width across a reload.
  • container?: HTMLElement | null — Where the card is drawn; the end of <body> when left out.
  • State: open (open / defaultOpen / onOpenChange); value (value / defaultValue / onValueChange); drawn by data-dragging, data-state=open

RecordPeekPanel

The open record's card.

TSX
import { RecordPeekPanel } from '@/components/goop/patterns/record-peek';

Options

  • resizeLabel?: string = 'Resize panel' — The resize handle's spoken name.
  • widthText?: (width: number) => string — The handle's width in words, for its aria-valuetext.
  • swipeable?: boolean — Trail's: on a phone, where its panel is a Sheet, a drag of its header closes the record.

RecordPeekTrigger

The control that opens its item's record (the record's name, or the whole of an event's card), a button by default (asChild for the caller's own control: it keeps its look and slot, marked data-record-peek-trigger).

TSX
import { RecordPeekTrigger } from '@/components/goop/patterns/record-peek';

Options

  • Also takes: asChild?: boolean; type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean

Keyboard

KeyWhat it does
ArrowUpStep to the previous record, outside a text field
ArrowDownStep to the next record, outside a text field
KStep to the previous record, outside a text field

Accessibility

  • The native element answers the keyboard.

Motion

  • The part sets its own motion: add no transition or animation of your own.

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/meadow/components/record-peek.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-record-peek.json --yes

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.