sheengemologic ui
All components

ListDetailLayout

A persistent URL-driven list and detail workspace with phone focus handoff and pane scroll continuity.@gemologic/sheen-patterns · application

Playground

This example has no scalar controls. Its validated source remains interactive below.
<AppShell label="Inbox" router={router}><ListDetailLayout router={router} items={[{ id: "one", label: "First", href: "/inbox/one" }]} listLabel="Messages" detailLabel="Message" listHref="/inbox" backLabel="Back to messages" detail={<article>First message</article>} /></AppShell>

Variant matrix

URL-selected detail

Anatomy

Package
@gemologic/sheen-patterns
Source
packages/patterns/src/ListDetailLayout.tsx
Tokens
  • --sheen-color-border
  • --sheen-color-bg
  • --sheen-color-bg-raised
  • --sheen-color-bg-hover
  • --sheen-color-bg-selected
  • --sheen-color-fg-muted
  • --sheen-color-focus-ring
  • --sheen-color-focus-ring-offset

Accessibility

Role: region, list, linkKeyboard: Tab, Shift+Tab, ArrowUp, ArrowDown, Home, End, Enter

Do

  • Keep the layout mounted in a route layout so list DOM and scroll survive detail navigation.
  • Drive detail content from the router's accepted location and retain it during revalidation.

Do not

  • Do not mirror URL selection into optimistic local state.
  • Do not replace the layout or either scroll viewport during background refresh.

Generated props

NameTypeDefaultDescription
router *RouterAdapterApplication router adapter whose accepted location selects the active item.
items *readonly ListDetailItem[]Stable-ID local destinations shown in the list pane.
listLabel *stringAccessible name for the list scroll region.
detailLabel *stringAccessible name for the persistent detail scroll region.
listHref *stringLocal destination used by the phone back link.
backLabel *stringLocalized visible label for the phone back link.
detail *JSX.ElementAccepted route detail content; keep retained content here during background refresh.
emptyDetailJSX.ElementOptional desktop content shown when the URL matches no item.
detailReadybooleanFalse while accepted detail content cannot yet restore its saved scroll position.
detailPaneIdstringStable restoration identity when more than one layout can coexist.
Native Solid/HTML attributes remain available and are omitted from this authored-prop view.