Genesis
@beta

BuilderLayout

BuilderLayout — the three columns of a builder: an outline of the parts on the left, the editor for the selected part in the centre, a live preview on the right. ```tsx <BuilderLayout outline={<QuestionList />} outlineLabel="Outline" editor={<QuestionEditor key={selectedId} />} preview={<LivePreview />} previewLabel="Preview" sticky /> ``` Responsive by container query, so it needs no knowledge of the page around it: all three columns from a 56rem container, wider side columns from 76rem, the preview under the editor below 56rem and everything stacked below 34rem (see `GRID` for each slot combination). The preview keeps its place in the tree when the editor or outline changes, so it never remounts; changing `previewLabel` between set and unset does remount it (the element changes from `<div>` to `<aside>`). It positions the three parts and nothing else. It does **not** own tabs, the app rail or a page header: those belong to the shell. Put a builder's sections in `useAppShellSubNav` (or your own tabs inside `editor`) and its title, status and actions in `AppShellPageHeader`. To keep one preview across sections, render one `BuilderLayout` around the sections and swap `editor`; nest a second one (outline and editor only) inside a section that has an outline.

packages/ui/src/components/layout/builder-layout.tsx

Import
Subpath export: @marktiderman/genesis-ui/layout
import { BuilderLayout } from "@marktiderman/genesis-ui/layout";
Components
Auto-generated from TypeScript source via react-docgen-typescript.

BuilderLayout

BuilderLayout — the three columns of a builder: an outline of the parts on the left, the editor for the selected part in the centre, a live preview on the right. ```tsx <BuilderLayout outline={<QuestionList />} outlineLabel="Outline" editor={<QuestionEditor key={selectedId} />} preview={<LivePreview />} previewLabel="Preview" sticky /> ``` Responsive by container query, so it needs no knowledge of the page around it: all three columns from a 56rem container, wider side columns from 76rem, the preview under the editor below 56rem and everything stacked below 34rem (see `GRID` for each slot combination). The preview keeps its place in the tree when the editor or outline changes, so it never remounts; changing `previewLabel` between set and unset does remount it (the element changes from `<div>` to `<aside>`). It positions the three parts and nothing else. It does **not** own tabs, the app rail or a page header: those belong to the shell. Put a builder's sections in `useAppShellSubNav` (or your own tabs inside `editor`) and its title, status and actions in `AppShellPageHeader`. To keep one preview across sections, render one `BuilderLayout` around the sections and swap `editor`; nest a second one (outline and editor only) inside a section that has an outline.

PropTypeDefaultDescription
editor*ReactNode—Centre column: the editor for the selected thing. Required.
editorPropsBuilderLayoutSlotProps—Props for the editor's wrapper.
outlineReactNode—Left column: the list of things being built (questions, lessons, steps). Optional. Rendered as a `<nav>` when `outlineLabel` is set.
outlineLabelstring—Accessible name for the outline; makes it a `navigation` landmark.
outlinePropsBuilderLayoutSlotProps—Props for the outline's wrapper (class, test id, data attributes).
previewReactNode—Right column: a live preview (and anything that sits with it, such as checks). Optional. Rendered as an `<aside>` when `previewLabel` is set. It keeps its place in the tree whatever `editor` and `outline` hold, so swapping the editor (another section, another selected item) never remounts it: the preview's own state (device, answers typed into it, scroll) survives.
previewHiddenbooleanfalseKeep the preview mounted but hidden, and give its width back to the editor. For a section that needs the whole width (a host's own settings layout) without losing the preview's state.
previewLabelstring—Accessible name for the preview; makes it a `complementary` landmark.
previewPropsBuilderLayoutSlotProps—Props for the preview's wrapper.
scrollStickybooleanfalseWith `sticky`, cap each pinned column at the viewport height and let it scroll on its own, so a long outline or preview stays reachable. Default `false`.
stickyboolean | { outline?: boolean; preview?: boolean; } | undefinedfalsePin the outline and/or the preview at the top while the editor scrolls, once each sits in a column of its own (not while stacked). `true` pins both. Default `false`.
Storybook
Storybook hosts the canonical visual reference with controls for every variant.