> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gavai.io/llms.txt
> Use this file to discover all available pages before exploring further.

# DetailPanel

> Single-record view with optional in-place edit — the natural destination for a Table row click.

export const Def = ({term, type, defaultValue, required, children}) => <>
    <dt className="gv-def-list__term">
      <span className="gv-def-list__name">{term}</span>
      {type && <span className="gv-def-list__type">{type}</span>}
      {required && <span className="gv-def-list__required">required</span>}
      {defaultValue !== undefined && <span className="gv-def-list__default">
          default <code>{defaultValue}</code>
        </span>}
    </dt>
    <dd className="gv-def-list__description">{children}</dd>
  </>;

export const DefList = ({children}) => <dl className="gv-def-list">{children}</dl>;

export const BrandCard = ({eyebrow, title, href, icon, badge, cta, featured = false, horizontal = false, children}) => {
  const classes = ["gv-card", featured && "gv-card--featured", horizontal && "gv-card--horizontal"].filter(Boolean).join(" ");
  const inner = <>
      {icon && <span className="gv-card__icon" aria-hidden="true">
          <Icon icon={icon} />
        </span>}
      <div className="gv-card__main">
        {(eyebrow || badge) && <div className="gv-card__meta">
            {eyebrow && <Eyebrow label={eyebrow} tone="muted" />}
            {badge && <span className="gv-card__badge">{badge}</span>}
          </div>}
        <h3 className="gv-card__title">{title}</h3>
        {children && <div className="gv-card__body">{children}</div>}
        {cta && <span className="gv-card__cta">
            {cta}
            <svg className="gv-card__cta-arrow" viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
              <line x1="7" y1="17" x2="17" y2="7" />
              <polyline points="7 7 17 7 17 17" />
            </svg>
          </span>}
      </div>
    </>;
  return href ? <a className={classes} href={href}>
      {inner}
    </a> : <div className={classes}>{inner}</div>;
};

export const ArrowItem = ({children}) => <li className="gv-arrow-item">
    <span className="gv-arrow-item__arrow" aria-hidden="true">{"↳︎"}</span>
    <span className="gv-arrow-item__content">{children}</span>
  </li>;

export const ArrowList = ({children}) => <ul className="gv-arrow-list">{children}</ul>;

export const FeatureTable = ({columns, rows, featuredRow, caption, variant}) => <div className={`gv-feature-table ${variant ? `gv-feature-table--${variant}` : ""}`}>
    <table>
      {caption && <caption className="gv-feature-table__caption">{caption}</caption>}
      <thead>
        <tr>
          {columns.map(col => <th key={col.key} scope="col">
              <span className="gv-feature-table__header">{col.label}</span>
            </th>)}
        </tr>
      </thead>
      <tbody>
        {rows.map((row, i) => {
  const rowClass = [i === featuredRow ? "gv-feature-table__row--featured" : "", row.chosen ? "gv-feature-table__row--chosen" : ""].filter(Boolean).join(" ");
  return <tr key={i} className={rowClass}>
              {columns.map(col => {
    const v = row[col.key];
    if (variant === "tradeoff" && Array.isArray(v)) {
      const pill = col.key === "pros" ? "gv-feature-table__pill--pro" : col.key === "cons" ? "gv-feature-table__pill--con" : "";
      return <td key={col.key}>
                      {v.map((item, j) => <span key={j} className={`gv-feature-table__pill ${pill}`}>{item}</span>)}
                    </td>;
    }
    return <td key={col.key}>{v}</td>;
  })}
            </tr>;
})}
      </tbody>
    </table>
  </div>;

export const Eyebrow = ({label, tone = "default"}) => <div className={`gv-eyebrow gv-eyebrow--${tone}`}>
    <span className="gv-eyebrow__bar" aria-hidden="true" />
    <span className="gv-eyebrow__label">{label}</span>
  </div>;

<Eyebrow label="BLOCK" />

`DetailPanel` displays a single record from a schema table. This page explains the props, how the record is resolved from the URL, and how edit mode interacts with user permissions. By default it renders in read mode; set `editable: true` to expose an edit toggle that lets users update field values in place. The record is resolved from a URL path parameter, which makes DetailPanel the natural destination for a row click in a Table block — Table navigates to `/<resource>/<id>` and DetailPanel reads the record at that path.

## Example

```json detail-panel.json theme={null}
{
  "block": "DetailPanel",
  "props": {
    "schema_table": "customers",
    "record_id_param": "id",
    "fields": ["name", "email", "status", "notes"],
    "editable": true
  }
}
```

## Props

<DefList>
  <Def term="schema_table" type="string" required>
    Name of the workspace schema table to read the record from.
  </Def>

  <Def term="record_id_param" type="string" required>
    Name of the URL path parameter that holds the record id. Typically `"id"`.
  </Def>

  <Def term="fields" type="string[]" required>
    Ordered list of column names to display (and optionally edit) in the panel.
  </Def>

  <Def term="editable" type="boolean" defaultValue="false">
    When `true`, renders an edit toggle that lets the user update field values in place.
  </Def>
</DefList>

## How it binds to data

The block reads `record_id_param` from the current URL. On a page mounted with a parameterized segment for the record id, setting `record_id_param: "id"` tells the runtime to look up the record whose primary key matches that segment. The lookup uses `runQuery` with a single-row filter.

<Note>
  The exact URL routing syntax (`/customers/:id` vs `/customers/[id]`) is not enumerated in the source. Verify against the Builder MCP routing schema or `packages/loom-types/` before shipping production routing.
</Note>

### Edit mode and permissions

When `editable` is `true`, users see a toggle that switches the panel from read mode to an editable form. The source describes edit access as "toggled by user permissions" — the precise model is gated by `authUser` roles and schema-level grants, but the full configuration shape is not enumerated in the source.

<Note>
  Edit access is gated by user permissions. The exact roles or grants involved are not enumerated here — check the `authUser` capability reference and your workspace schema grants.
</Note>

## Patterns

<ArrowList>
  <ArrowItem>**Paired with Table.** The Table's `on_row_click.navigate` sends the user to a detail page where DetailPanel loads the same record by id.</ArrowItem>
  <ArrowItem>**Customer profile.** Show `name`, `email`, `status`, `notes`; enable `editable` so support staff can update records without leaving the page.</ArrowItem>
  <ArrowItem>**Read-only audit view.** Disable `editable` for a clean, non-interactive record view used in compliance or audit workflows.</ArrowItem>
</ArrowList>

## Common props

In addition to the DetailPanel-specific props, every block accepts `id`, `class_overrides`, `visible_if`, and `analytics_event`. See [common props on the PageBlocks overview](/pageblocks/overview#common-props).

## Where to go next

<Columns cols={2}>
  <BrandCard eyebrow="BLOCK" title="Table" href="/pageblocks/blocks/table">
    The natural upstream block — Table → DetailPanel via row click.
  </BrandCard>

  <BrandCard eyebrow="BLOCK" title="KanbanBoard" href="/pageblocks/blocks/kanban-board">
    Same data, board view — for workflows where state matters more than identity.
  </BrandCard>
</Columns>
