Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

docs(spec): Layout records its shipped contract as current (#8822)

Cindy Zhang48f3699cfeb9
diff --git a/docs/architecture/container-padding.md b/docs/architecture/container-padding.md
index bf99eacd45..54e5cb5205 100644
--- a/docs/architecture/container-padding.md
+++ b/docs/architecture/container-padding.md
@@ -99,7 +99,7 @@ The protocol has four layers:
| Role | Participants | Contract responsibility |
| -------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Container publisher | Card, Section, Dialog, BottomSheet, ScrollableArea | Resolve component padding or publish explicit content-box padding as logical-edge and Layout inset variables |
-| Region publisher | LayoutHeader, LayoutContent, LayoutFooter, LayoutPanel | Publish baseline or explicit-padding geometry; automatic outer-edge publication has the conformance gap below |
+| Region publisher | LayoutHeader, LayoutContent, LayoutFooter, LayoutPanel | Publish baseline or explicit-padding geometry; automatic-edge publication has the conformance gap below |
| Bleed consumer | Section, ScrollableArea, Layout, Divider, Table, TabList, List | Subtract inherited inset on the edges each component is designed to escape; ScrollableArea does so only with `isFullBleed`, TabList and List only with `edge="bleed"` |
| Edge-compensation consumer | List/ListItem rows with `edge="outset"` | Move visible content toward the container content line while retaining component-owned interaction padding; exact alignment depends on each component's bounded geometry |
| Alignment consumer | Toolbar and edge-compensating child components | Read the current inline inset to align visible content rather than stacked touch-target padding |
@@ -286,12 +286,14 @@ without dropping the active theme's Section default.
### Known conformance gap
-LayoutContent and LayoutPanel do not currently republish every automatic
-outer-edge inset they apply:
+LayoutContent and LayoutPanel do not currently publish the padding they apply
+on every automatic edge:
- LayoutContent's no-start path changes inline-start padding and writes the outer
- value to both inline geometry variables, while its no-end path changes
- inline-end padding without changing the matching variable.
+ value to both inline geometry variables, so with only an end panel the
+ inline-end variable carries the outer value while the applied inline-end
+ padding is the inner inset. Beside a header or footer without a divider, its
+ block edge applies zero while publishing the inner inset.
- LayoutPanel changes padding on shell-facing inline and block edges while its
baseline geometry variables remain on the inner values.
diff --git a/docs/families/layout-regions.md b/docs/families/layout-regions.md
index c1b011e41c..a3cd865d2b 100644
--- a/docs/families/layout-regions.md
+++ b/docs/families/layout-regions.md
@@ -205,7 +205,7 @@ wrapper, or a header-like visual treatment.
| -------------------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Section | Generic region and container-padding publisher | Its nested escape is always inline but only first/last child on the block axis |
| Layout container | Five-slot region owner with slot contexts | Content-only LayoutContent stays full width and aligns direct children through insets. With exactly one panel, the panel remains aligned while content extends to the opposite open edge. With both panels or intrinsic content widths, the middle composition stays constrained. Tests cover topology; browser evidence covers mirrored alignment and scrollbar placement. |
-| LayoutContent | Reads slot presence and applies outer/inner inset | Its no-start path writes the outer value to both inline geometry variables, while no-end changes padding without the matching variable update |
+| LayoutContent | Reads slot presence and applies outer/inner inset | Its no-start path writes the outer value to both inline geometry variables, so with only an end panel the inline-end variable differs from the applied inner inset; beside a header or footer without a divider the block edge applies zero but publishes the inner inset |
| LayoutPanel | Applies position-aware padding and may accept resize-driven width | Automatic Layout-edge padding leaves baseline inner geometry variables; an adjacent `ResizeHandle hasDivider` can double the line unless the caller sets panel `hasDivider={false}` |
| LayoutHeader/Footer | Region-specific inset, boundary, and landmarks | Cross-region computed-style parity is not covered by one browser matrix |
| Toolbar | Section-backed surface plus toolbar behavior | Inline inset and edge compensation follow the composed Section's current padding context |
diff --git a/packages/core/src/Layout/Layout.spec.md b/packages/core/src/Layout/Layout.spec.md
index 6a0c5f299d..5e74c06782 100644
--- a/packages/core/src/Layout/Layout.spec.md
+++ b/packages/core/src/Layout/Layout.spec.md
@@ -1,13 +1,13 @@
---
schema_version: 3
-template_version: 3
+template_version: 7
kind: component
id: component:Layout
-authority: draft
+authority: current
archive_reason: null
superseded_by: null
-approved_by: null
-approved_at: null
+approved_by: cixzhang
+approved_at: 2026-10-30
owners: [cixzhang]
review_triggers: [public-api, behavior, layout, theming, accessibility]
verified_by:
@@ -16,7 +16,9 @@ verified_by:
packages/core/src/Layout/LayoutSlots.test.tsx,
packages/core/src/Layout/__tests__/childrenAsContent.test.tsx,
packages/core/src/Layout/__tests__/contentWidth.test.tsx,
+ packages/core/src/Layout/__tests__/nestedPadding.test.tsx,
packages/core/src/theme/themingTargets.test.ts,
+ .github/visual-baseline/manifest.json,
scripts/check-knowledge.mjs,
]
modules: []
@@ -29,157 +31,150 @@ architecture:
architecture:public-component-api,
]
contributing: []
-system_specs: []
+system_specs: [spec:AST-038]
---
# Layout component contract
+## Contract at a glance
+
+| Area | Contract |
+| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Public contract | Five ReactNode slots (`header`, `start`, `content`, `end`, `footer`), `children` as content shorthand, `height`, `padding`, `contentWidth`, `defaultHasDividers`. |
+| Behavior | Layout arranges caller content in five named slots, fills or grows with its container, and sets the inset and content width its region components use. |
+| End-user impact | People see headers, side panels, content, and footers in stable positions that mirror in right-to-left, with content aligned to one readable width. |
+| Builder impact | None; the record describes shipped behavior. |
+| Compatibility/readiness | Released behavior recorded as current; no API, default, or output changes. One implementation gap is listed under Current-state impact. |
+| Review checks | Reject a target added to arbitrary slot content, an inherited parent Layout padding, a content scrollbar moved off the open edge, or overridable `data-height`. |
+| Governing rules | `family:layout-regions` FR1–FR12; `architecture:container-padding`; `architecture:component-theming-surface`; `architecture:public-component-api` INV5–INV8. |
+
+This table is a review projection; the body below is authoritative.
+
## Intent
-Layout is a general layout primitive that arranges five optional named slots:
-Header, logical-start Panel, Content area, logical-end Panel, and Footer. It can
-structure regions within a page or bounded container, while AppShell owns the
-page shell. This draft records the aggregate consumer anatomy, theming ownership,
-and content-width behavior without adding a public API or changing internal
-parent/child communication.
+Layout is a general layout primitive that arranges five optional named slots —
+header, logical-start panel, content, logical-end panel, and footer — within a
+page or a bounded container. AppShell owns the page shell.
+
+Consumer syntax and examples belong in `Layout.doc.mjs`.
## Compatibility and migration
-- Released default preserved: `yes`
-- Compatibility class: bug fix; LayoutContent keeps the same root, direct-child
- DOM, props, overflow behavior, padding ownership, and default. Context-aware
- inline insets align content while the root scrollport stays full width.
+- Released default preserved: `yes` — `height="fill"`, no padding override,
+ no content width, divider defaults inherited.
+- Compatibility class: records shipped behavior; no public prop, default, DOM,
+ target, or styling output changes.
- Controlled/uncontrolled behavior: not applicable
- Migration decision: none
Consumer migration instructions belong in consumer docs and release notes.
+## Current-state impact
+
+- **A `false` slot still counts as present (FR1).** Slot presence is
+ `!= null`, so `header={isOpen && <LayoutHeader />}` renders no header when
+ `isOpen` is false, yet the content and panels keep the inner inset on their
+ block-start edge instead of the outer inset `family:layout-regions` FR3 gives
+ an edge on the Layout boundary. With `contentWidth`, a `false` start or end
+ slot (the `showPanel && <LayoutPanel />` idiom) switches Layout to its
+ one- or two-panel composition, so LayoutContent stops at the content-width frame on
+ that side, and with a `false` end slot its scrollbar does too, instead of
+ reaching the Layout edge (FR6).
+
## Ownership boundary
**Owns**
-- The Layout container and its current `layout` target.
-- The five named slot positions: `header`, `start`, `content`, `end`, and
- `footer`; each accepts caller-provided ReactNode content.
-- The aggregate optional Header, Panel, Content area, and Footer anatomy when the
- caller composes the corresponding Layout region components, and their current
- `layout-header`, `layout-panel`, `layout-content`, and `layout-footer` targets.
-- One LayoutPanel concept and `layout-panel` target shared by instances supplied
- to the logical-start and logical-end slots.
+- The Layout container, its `layout` target, and the five slot positions.
+- Height, the Layout-edge inset, content width, and the header and footer
+ divider default that its region components read.
+- The aggregate consumer document and theming map for the `layout`,
+ `layout-header`, `layout-panel`, `layout-content`, and `layout-footer`
+ targets.
**Does not own / non-goals**
-- The page shell, app-wide navigation, responsive shell substitution, skip link,
- or main landmark, which are owned by AppShell.
-- Product meaning or content supplied to any slot, which is owned by the caller.
-- Automatic responsive substitution of regions outside AppShell, which is owned
- by the caller or another higher-level composition.
-- Resize interaction, which is owned by useResizable and ResizeHandle.
-- Correcting current container-padding publication mismatches or preventing two
- adjacent divider owners from both painting; those remain current gaps and
- caller obligations recorded below.
-- New public API, target, alias, slot-level region wrapper, or parent-to-child
- context communication.
+- The page shell, app-wide navigation, responsive shell substitution, skip
+ link, or main landmark — owned by AppShell.
+- Product meaning or content in any slot — owned by the caller.
+- Region semantics, scrolling, insets, and dividers — owned by
+ `component:LayoutHeader`, `component:LayoutContent`,
+ `component:LayoutFooter`, and `component:LayoutPanel`.
+- Resize interaction — owned by useResizable and ResizeHandle.
## Public concepts
-The current public topology has five independent ReactNode slots. Slot position
-is not rendered anatomy and does not add a target to arbitrary content.
-
-| Concept | Current values | Meaning |
-| ------------- | --------------------------------------------- | -------------------------------------------------------------------------------------------- |
-| slot topology | `header`, `start`, `content`, `end`, `footer` | Positions caller content in the five-slot arrangement; omitted slots render no area wrapper. |
-| slot content | any ReactNode | The caller may supply Layout region components or unrelated content. |
-| panel anatomy | LayoutPanel in `start` and/or `end` | Both positions use one optional Panel anatomy concept and one `layout-panel` target. |
-
-Consumer syntax, defaults, and recommended region components remain documented
-in `Layout.doc.mjs` and the region subcomponent docs. `family:layout-regions`
-owns the shared region vocabulary, while `architecture:container-padding` owns
-the broader container system shared with Section, Table, Toolbar, and Divider.
+| Concept | Closed values or states | Meaning | Availability by variant/orientation/state | Default | Owner | Stability | Invalid-value behavior |
+| ----------------- | --------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------- | ------------------- | ------------------ | --------- | ----------------------------------- |
+| Slot topology | `header`, `start`, `content`, `end`, `footer` | Positions caller content; an omitted slot renders nothing. | Always | all omitted | `component:Layout` | Stable | — |
+| Content shorthand | `children` | Fills the content slot when `content` is omitted. | Always | omitted | `component:Layout` | Stable | `content` wins when both are given. |
+| Height | `fill`, `auto` | Fill the container, or grow with content. | Always | `fill` | `component:Layout` | Stable | Closed union; rejected by types. |
+| Layout-edge inset | spacing step; `0` | The inset regions apply at the Layout's outer edges; `0` is full bleed. | Always | inherited or step 4 | `component:Layout` | Stable | Closed union; rejected by types. |
+| Content width | number (px); CSS length string | Width of the aligned content in every slot. | Always | none | `component:Layout` | Stable | — |
+| Divider default | `true`, `false`, unset | Divider default for LayoutHeader and LayoutFooter children. | Always | inherited | `component:Layout` | Stable | — |
## Behavioral and layout contract
-| ID | Candidate invariant | Basis | Draft review state |
-| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | -------------------------------------------------- |
-| FR1 | Layout renders one general Layout container carrying the current `layout` target and places arbitrary caller-provided ReactNode content in the `header`, `start`, `content`, `end`, and `footer` slots. Slot placement alone adds no region component or target. | Current source, docs, and tests | Verified current behavior; no new behavior decided |
-| FR2 | When the caller supplies LayoutHeader, LayoutContent, or LayoutFooter, that component carries its current `layout-header`, `layout-content`, or `layout-footer` target; Layout does not add those targets to arbitrary slot content. | Current source and target metadata | Verified current inventory; no target change |
-| FR3 | LayoutPanel instances supplied to logical start or end share one aggregate Panel anatomy part and the current `layout-panel` target; slot position does not create a second anatomy part or target. | Current source, docs, tests, and family | Verified current ownership; no API change |
-| FR4 | `Layout.doc.mjs` is the canonical aggregate consumer document for the five current `layout*` targets and maps each target once; region subcomponent docs continue to document their own props and usage. | Current documentation organization | Verified current ownership |
-| FR5 | LayoutContent and LayoutPanel retain their shipped automatic container-padding publication behavior, including the mismatches recorded by `architecture:container-padding`; this documentation does not claim exact parity. | Current source and architecture record | Current conformance gap; not fixed here |
-| FR6 | When an adjacent ResizeHandle owns a panel divider, the caller must keep `LayoutPanel hasDivider={false}`; current composition does not prevent both components from painting the same boundary. | Current source, docs, and family contract | Current caller obligation; not fixed here |
-| FR7 | When `contentWidth` is set without panels, LayoutContent spans the available middle area and aligns its direct children through context-aware inline insets. With exactly one panel, the panel stays aligned while LayoutContent extends through the opposite open side; logical start and end mirror. With both panels, or a percentage (including percentage-bearing CSS math), intrinsic, or bare-variable width that cannot safely share one CSS arithmetic basis, the complete middle composition remains constrained. A guaranteed length-valued variable uses `calc(var(...))`. LayoutContent's root remains the scroll, padding, styling, and direct-child owner. | Current family contract and browser evidence | Proposed bug fix; no API or context change |
-
-### Current evidence and gaps
-
-- LayoutContent does not republish a matching inline-end container-padding value
- on its automatic no-end path, and its no-start path writes the outer inline
- value to both inline geometry variables. LayoutPanel applies automatic outer
- Layout-edge padding while retaining baseline inner geometry variables. A
- full-bleed descendant can therefore compensate against a published value that
- differs from the region's applied padding. This is shipped evidence and a
- runtime conformance gap, not behavior corrected or approved by this draft.
-- LayoutPanel and an adjacent ResizeHandle can both draw the same content-facing
- divider. The current caller obligation is to set
- `LayoutPanel hasDivider={false}` when ResizeHandle owns that line. This draft
- does not add coordination or duplicate-divider prevention.
+| ID | Invariant | Basis |
+| --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
+| FR1 | Layout renders an outer `div` carrying the `layout` target, which reflects `height`, around an inner vertical stack: the header slot, a middle row holding the start slot, the content slot, and the end slot, then the footer slot. An omitted header, start, end, or footer slot renders nothing; a slot that renders nothing is absent, so the neighbouring regions take the outer inset on that side (`family:layout-regions` FR3); the middle row and the content slot's fill wrapper always render. `content` fills the content slot, and `children` fill it when `content` is omitted. Slot position adds no element, region component, or target to the caller's content. Implementation gap: a slot counts as present unless it is `null` or `undefined`, so a `false` slot renders nothing yet leaves its neighbours on the inner inset, and with `contentWidth` a `false` start or end slot switches to the one- or two-panel composition of FR6 (Current-state impact). | Current source, docs, and tests; `family:layout-regions` FR1, FR3 |
+| FR2 | The outer `div` escapes the parent's published container padding on all four edges, and the inner stack publishes zero container padding before its regions publish their own. `fill` (the default) makes the Layout fill its container's height, including the escaped block padding; `auto` lets it grow with content, at least as tall as its container. | Current source and tests; `architecture:container-padding` |
+| FR3 | `padding` sets the inset that this Layout's own region components apply at its outer edges; `0` is full bleed. A nested Layout does not inherit a parent Layout's padding: without its own `padding`, its regions use the nearest padding container's padding (Card, Section, Dialog, Drawer, or BottomSheet), or spacing step 4. How each region applies and publishes that inset is owned by its record (`component:LayoutHeader`, `component:LayoutContent`, `component:LayoutFooter`, `component:LayoutPanel`). | Current source, docs, and tests; `family:layout-regions` FR4; `architecture:container-padding` |
+| FR4 | When the caller supplies LayoutHeader, LayoutContent, LayoutFooter, or LayoutPanel, that component carries its own `layout-header`, `layout-content`, `layout-footer`, or `layout-panel` target. LayoutPanel at logical start, end, or both is one Panel part and one `layout-panel` target. | Current source, docs, and tests; `family:layout-regions` FR11 |
+| FR5 | `defaultHasDividers` sets the divider default for LayoutHeader and LayoutFooter descendants; an explicit `hasDivider` wins, and when unset a nested Layout keeps its parent's default within the same layer; the default stops at a Dialog, Drawer, BottomSheet, or other layer boundary (`spec:AST-038` FR7). LayoutPanel does not read the default (`component:LayoutPanel` FR4). | Current source, docs, and tests |
+| FR6 | With `contentWidth` and no panels, LayoutContent spans the middle area and aligns its direct children to the content width, so its scrollbar stays at the outer edge. With exactly one panel, the panel stays aligned while LayoutContent extends through the opposite open side; start and end mirror. With both panels, or a percentage (including percentage-bearing CSS math), intrinsic, or bare-variable width, the whole middle composition stays constrained; a length-valued variable uses `calc(var(...))`. Numbers are pixels. A nested Layout without `contentWidth` does not inherit its parent's. | Current source, docs, and tests; `family:layout-regions` FR12 |
+| FR7 | `ref`, DOM, data, ARIA, and event props, `xstyle`, `className`, and `style` reach or compose on the outer `div`; the reflected `data-height` replaces a caller's value. | Current source and tests; `architecture:public-component-api` INV5–INV8 |
### Allowed variation
-- **AV1 — Slot presence and content.** Header, start, content, end, and footer may
- be independently present or absent and may contain any caller-provided
- ReactNode. Slot content does not become Layout anatomy by position alone.
-- **AV2 — Region composition.** Callers may supply LayoutHeader, LayoutContent,
- LayoutFooter, or LayoutPanel in the matching slot when they need those region
- components and targets; Layout does not insert them automatically.
-- **AV3 — Panel position.** LayoutPanel may occupy logical start or end, or both
- positions may be supplied; all instances remain one Panel anatomy concept and
- target.
+- **AV1 — Slot presence and content.** Any slot may be present or absent and
+ hold any ReactNode; content does not become Layout anatomy by position.
+- **AV2 — Region composition.** Callers choose which region components to
+ supply; Layout does not insert them.
### Representative states
-| State | Required invariant | Allowed variation |
-| ------------------------------ | ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------- |
-| Arbitrary content only | Layout container carries `layout`; arbitrary content gains no region target from its slot. | Caller content and current height/width configuration. |
-| Composed header/content/footer | Supplied Layout region components retain their own anatomy and targets. | Without panels, contentWidth aligns inside the full-width LayoutContent scrollport. |
-| Start or end LayoutPanel | Either logical position uses the one Panel anatomy part and `layout-panel` target. | Position, width, scrolling, padding, caller role, and content-area edge scrolling. |
-| Two LayoutPanels | Both instances remain repetitions of the same Panel anatomy part and target. | The constrained content scrollbar remains between the two panels. |
-| ResizeHandle-adjacent | Divider ownership follows the current caller obligation in FR6. | Resize state remains owned by the resize components. |
+| State | Required invariant | Allowed variation |
+| ---------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------ |
+| Arbitrary content only | `layout` target on the root; slot content gains no target. | Content and height. |
+| Composed regions | Each supplied region carries its own target. | Which regions are supplied. |
+| One panel | The panel aligns to the content width; content extends to the open side. | Start or end; mirrored in RTL. |
+| Two panels | The whole middle composition is constrained to the content width. | Panel widths. |
+| Nested Layout | No inherited Layout padding or content width; divider default inherited within the same layer. | Its own explicit values. |
### Transformation and precedence order
-- `contentWidth` keeps LayoutContent's root scrollport full width without panels.
- With exactly one panel, the root extends through the opposite open side; the
- panel and LayoutContent's direct children stay aligned through inline insets.
- Start and end mirror. With both panels, or with a percentage (including
- percentage-bearing CSS math), intrinsic, or bare variable that cannot safely
- share one CSS arithmetic basis, the complete middle composition stays constrained. A guaranteed length-valued variable
- uses `calc(var(...))`. Layout does not add a context field or inspect/mutate
- the child.
-- No new slot, padding, divider, scrolling, sizing, or public styling precedence
- rule is introduced.
+- **ORD1 — Content slot.** `content` → `children`.
+- **ORD2 — Inset.** This Layout's `padding` → the enclosing Card, Section,
+ Dialog, Drawer, or BottomSheet padding → spacing step 4; a parent Layout's padding never applies.
+- **ORD3 — Divider default.** A region's `hasDivider` → the nearest
+ `defaultHasDividers` in the same layer → no divider.
### Performance and resources
-- No new performance or resource rule is introduced.
+- **PR1 — No external lifecycle.** Layout adds no listener, observer, timer,
+ or measurement; content-width alignment is CSS-only.
## Accessibility contract
-This draft does not add inferred landmark semantics. LayoutHeader,
-LayoutContent, LayoutFooter, and LayoutPanel retain their current explicit
-caller-supplied role and label behavior.
+- **AR1 — No inferred landmarks.** Layout adds no role or name; landmark
+ semantics come only from a region component's caller-supplied `role` and
+ `label` (`family:layout-regions` FR8).
+- **AR2 — Logical order.** Slots render in DOM order header, start, content,
+ end, footer, and start and end follow writing direction
+ (`family:layout-regions` FR2).
## Design relationships
-| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
-| ---------------- | ---------------------------------------------------------------------------------------- | ----------------------------------------- | -------------- | ------------------ |
-| Layout container | Places arbitrary caller content in the five named slots without becoming the page shell. | Current source, docs, and family contract | Supporting | FR1 |
-| Header | Presents an optional caller-supplied LayoutHeader region. | Current source, docs, and family contract | Supporting | FR2 |
-| Panel | Presents a caller-supplied LayoutPanel at logical start or end. | Current source, docs, and family contract | Supporting | FR3, FR6 |
-| Content area | Presents an optional caller-supplied LayoutContent region. | Current source, docs, and family contract | Prominent | FR2, FR5 |
-| Footer | Presents an optional caller-supplied LayoutFooter region. | Current source, docs, and family contract | Supporting | FR2 |
+| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
+| ---------------- | ------------------------------------------------------ | ---------------------------- | -------------- | ------------------ |
+| Layout container | Places caller content in five named slots. | Current source, docs, family | Supporting | FR1, FR2 |
+| Header | An optional caller-supplied LayoutHeader. | Current source, docs, family | Supporting | FR4, FR5 |
+| Panel | A caller-supplied LayoutPanel at logical start or end. | Current source, docs, family | Supporting | FR4, FR5 |
+| Content area | An optional caller-supplied LayoutContent. | Current source, docs, family | Prominent | FR4, FR6 |
+| Footer | An optional caller-supplied LayoutFooter. | Current source, docs, family | Supporting | FR4, FR5 |
-Slot position is topology, not anatomy. Arbitrary ReactNode content supplied to
-a slot does not acquire the corresponding region part or target.
+Slot position is topology, not anatomy.
### Theming anatomy
@@ -195,34 +190,35 @@ a slot does not acquire the corresponding region part or target.
}
```
-The exact map records each current public target once. Panel represents every
-caller-supplied LayoutPanel instance, whether placed at logical start, logical
-end, or both. It does not map the `start` and `end` slots themselves.
+Panel stands for every LayoutPanel, at logical start, end, or both.
## Family and system relationships
-- `family:layout-regions` owns the shared named-region topology, logical
- direction, boundaries, scrolling, and component ownership. Layout adopts that
- vocabulary without owning the page shell.
-- `architecture:container-padding` owns the broader container system shared by
- Section, Layout and its regions, Table, Toolbar, and Divider, including the
- current LayoutContent/LayoutPanel conformance gap. Participation in that
- system does not make Table or Divider Layout regions.
-- `architecture:component-theming-surface` owns anatomy qualification and exact
- target mapping rules.
-- `architecture:public-component-api` owns the stable slots, props, exports, and
- compatibility boundary; this documentation adds no API.
+- `family:layout-regions` owns region topology, logical direction, boundaries,
+ scrolling, landmarks, and content-width scrollbar placement; FR1–FR6 and
+ AR1–AR2 apply it.
+- `architecture:container-padding` owns publication and escape of container
+ inset; FR2 and FR3 apply it.
+- `component:LayoutHeader`, `component:LayoutContent`, `component:LayoutFooter`,
+ and `component:LayoutPanel` own each region's behavior, including the
+ publication gaps LayoutContent and LayoutPanel record.
+- `architecture:component-theming-surface` owns anatomy and target mapping.
+- `architecture:public-component-api` owns caller-input routing; FR7 applies
+ it.
## Verification map
-| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
-| ------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
-| FR1–FR3 | Layout render, slot-context, children-as-content, region-component, and target inventory tests | Arbitrary slot content, optional region components, logical start/end LayoutPanels | Removing slot placement, a composed region, or a current target fails existing structure, context, or target assertions; arbitrary slot content is not asserted to gain a target. | `audit:Layout/anatomy` |
-| FR4 | `scripts/check-knowledge.mjs` | Canonical aggregate doc and exact five-target map | Missing, extra, prefixed, or stale target mappings fail repository validation. | `audit:Layout/theming` |
-| FR5 | Source inspection plus `architecture:container-padding` verification evidence | Automatic outer-edge Content area and Panel paths | This draft adds no parity assertion; a runtime correction requires separate compatibility evidence. | `audit:Layout/layout` |
-| FR6 | LayoutPanel source/docs plus `family:layout-regions` verification evidence | Panel beside a divider-owning ResizeHandle | This draft adds no prevention assertion; changing ownership requires separate runtime coverage. | `audit:Layout/layout` |
-| FR7 | `contentWidth.test.tsx` plus the Storybook scrollbar-placement matrix | No panels, start only, start and end, end only | Removing the full-width no-panel content scrollport or moving any scrollbar away from its content-area edge fails focused structure or browser geometry checks. | `audit:Layout/layout` |
-| Accessibility | `LayoutSlots.test.tsx` landmark assertions | Header, Content area, Footer, and Panel roles | Supplied role or label no longer reaches the region element. | `audit:Layout/accessibility` |
+| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
+| ------------------- | ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
+| FR1, ORD1, AV1 | `Layout.test.tsx` slot and content tests; `childrenAsContent.test.tsx` | Every slot; omitted slots; `content` and `children` | A missing slot or `children` beating `content` fails. Gap: the omitted-slot test checks only the content text, so a wrapper rendered for an omitted slot passes, and no test asserts that slot content gains no target or element. No test covers a `false` slot. | `audit:Layout/anatomy` |
+| FR2 | `Layout.test.tsx` height-reflection tests | `fill`, `auto` | A lost `data-height` reflection fails. Gap: the escape margins, the zero publication, and the fill and auto heights have no automated check. | `audit:Layout/layout` |
+| FR3, ORD2 | `nestedPadding.test.tsx` | Inside AppShell, Card, Section; nested full-bleed and padded Layouts; explicit nested padding | A nested Layout inheriting a parent Layout's padding, or losing the enclosing Card or Section padding or the default inset, fails. Gap: `Layout.test.tsx` padding tests assert only that rendering succeeds. | `audit:Layout/layout` |
+| FR4 | `LayoutSlots.test.tsx` class tests; `themingTargets.test.ts` | Each region component; start and end panels | A lost region target fails. | `audit:Layout/theming` |
+| FR5, ORD3 | `Layout.test.tsx` divider-default tests | Default true; unset; explicit `false` | A header or footer that ignores the default, or an explicit `hasDivider={false}` that loses, fails. Gap: nested inheritance has no check. No test covers the default stopping at a layer boundary. | `audit:Layout/layout` |
+| FR6 | `contentWidth.test.tsx`; stable visual baseline `core-layout--content-width-scrollbar-placement` | No panels, start only, end only, both; zero padding; nested | A no-panel content region that is not full width, a both-panel middle that is not constrained, or a nested Layout inheriting content width fails; a scrollbar moved off its content edge comes back changed for review. No test covers a `false` start or end slot. | `audit:Layout/layout` |
+| FR7 | `Layout.test.tsx` ref, className, style, passthrough, and owned-metadata tests | Ref; caller inputs; colliding `data-height` | A ref on another element, a dropped caller input, or a caller `data-height` that wins fails. Gap: no test covers event props or the `xstyle` merge order. | `audit:Layout/api` |
+| AR1, AR2, PR1 | Source review | Every slot | Gap: no automated check fails if Layout adds a role, reorders slots, or adds a listener or measurement. | `audit:Layout/accessibility` |
+| Theming anatomy map | `scripts/check-knowledge.mjs` | Consumer anatomy and current targets | Missing, extra, or stale mappings fail repository validation. | `audit:Layout/theming` |
## Decision log
diff --git a/packages/core/src/Layout/LayoutContent.spec.md b/packages/core/src/Layout/LayoutContent.spec.md
new file mode 100644
index 0000000000..c81f5e8eee
--- /dev/null
+++ b/packages/core/src/Layout/LayoutContent.spec.md
@@ -0,0 +1,205 @@
+---
+schema_version: 3
+template_version: 7
+kind: component
+id: component:LayoutContent
+authority: current
+archive_reason: null
+superseded_by: null
+approved_by: cixzhang
+approved_at: 2026-10-30
+owners: [cixzhang]
+review_triggers: [public-api, behavior, layout, theming, accessibility]
+verified_by:
+ [
+ packages/core/src/Layout/LayoutSlots.test.tsx,
+ packages/core/src/Layout/__tests__/contentWidth.test.tsx,
+ packages/core/src/Layout/__tests__/Layout.a11y.test.tsx,
+ packages/core/src/Layout/__tests__/Layout.a11y.chromium.spec.ts,
+ .github/visual-baseline/manifest.json,
+ scripts/check-knowledge.mjs,
+ ]
+modules: []
+families: [family:layout-regions]
+design_specs: []
+architecture:
+ [
+ architecture:container-padding,
+ architecture:component-theming-surface,
+ architecture:public-component-api,
+ ]
+contributing: []
+system_specs: [spec:AST-038]
+---
+
+# LayoutContent component contract
+
+## Contract at a glance
+
+| Area | Contract |
+| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
+| Public contract | `children`, `isScrollable`, `padding`, `label`, `role`, root `BaseProps`, and a root `ref`. |
+| Behavior | The main content region fills the Layout's middle area, scrolls by default, and insets its children from neighbouring regions and open edges. |
+| End-user impact | People scroll the main content while headers, footers, and panels stay put, with the scrollbar at the content area's open edge. |
+| Builder impact | None; the record describes shipped behavior. |
+| Compatibility/readiness | Released behavior recorded as current; no API, default, or output changes. Three implementation gaps are listed under Current-state impact. |
+| Review checks | Reject an inner wrapper around the children, a scrollbar moved off the open edge, an inferred landmark, or a further publication mismatch. |
+| Governing rules | `family:layout-regions` FR1, FR3, FR4, FR7, FR8, FR12; `architecture:container-padding`; `architecture:public-component-api` INV5–INV8. |
+
+This table is a review projection; the body below is authoritative.
+
+## Intent
+
+LayoutContent is the main content region a caller places in a Layout's
+`content` slot. It owns the region's scrolling, inset, and caller-supplied
+landmark semantics; the caller owns its content.
+
+Consumer syntax and examples belong in `LayoutContent.doc.mjs`.
+
+## Compatibility and migration
+
+- Released default preserved: `yes` — scrollable, automatic inset, no
+ landmark role.
+- Compatibility class: records shipped behavior; no public prop, default, DOM,
+ target, or styling output changes.
+- Controlled/uncontrolled behavior: not applicable
+- Migration decision: none
+
+Consumer migration instructions belong in consumer docs and release notes.
+
+## Current-state impact
+
+- **Open inline-end edge keeps the inner inset beside a start panel (FR2).**
+ With only a start panel, the open inline-end edge applies the inner inset
+ (spacing step 4 by default) instead of the Layout-edge inset, even when the
+ Layout sets `padding={0}`, so content stops short of an edge that should be
+ full bleed (`family:layout-regions` FR3).
+- **Published padding differs from applied padding (FR2).** With only an end
+ panel, the inline-end edge applies the inner inset beside the panel but
+ publishes the Layout-edge inset. Beside a header or footer without a
+ divider, the block edge applies zero but publishes the inner inset, so a
+ nested full-bleed child or Layout starts one inner inset away from the
+ content box. `architecture:container-padding` has a region publish its
+ applied padding.
+- **Nested content inherits an outer collapse (FR2).** When an outer Layout's
+ header or footer has no divider, its middle row zeroes the content's block
+ spacing on that side, and a Layout nested inside that row inherits the zero,
+ even inside a Dialog, Drawer, or BottomSheet opened from it, so its content
+ sits flush against its own header's or footer's divider, where
+ `family:layout-regions` FR6 collapses spacing only where the divider is
+ absent and `spec:AST-038` FR7 stops inherited layout state at a layer
+ boundary.
+
+## Ownership boundary
+
+**Owns**
+
+- The content root, which carries the `layout-content` target that
+ `component:Layout` maps, and is both the scroll container and the direct
+ parent of the children.
+- The region's inset, scrolling, and caller-supplied role and label.
+
+**Does not own / non-goals**
+
+- Slot placement, the Layout-edge inset, and content width — owned by
+ `component:Layout`.
+- Content and its meaning — owned by the caller.
+
+## Public concepts
+
+| Concept | Closed values or states | Meaning | Availability by variant/orientation/state | Default | Owner | Stability | Invalid-value behavior |
+| --------- | ------------------------- | --------------------------------------------------------------------------- | ----------------------------------------- | --------- | ------------------------- | --------- | -------------------------------- |
+| Scrolling | `true`, `false` | Scrolls overflow, or clips it. | Always | `true` | `component:LayoutContent` | Stable | — |
+| Inset | spacing step; `0`; unset | Uniform padding that replaces the automatic inset; `0` is full bleed. | Always | automatic | `component:LayoutContent` | Stable | Closed union; rejected by types. |
+| Landmark | caller `role` and `label` | Exposes the region as the role the caller names, with that accessible name. | Always | none | caller | Stable | — |
+
+## Behavioral and layout contract
+
+| ID | Invariant | Basis |
+| --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
+| FR1 | LayoutContent renders one `div` carrying the `layout-content` target that fills the middle area's height and remaining width and holds the children directly. It scrolls overflow by default; `isScrollable={false}` clips it. | Current source and tests; `family:layout-regions` FR7 |
+| FR2 | Without `padding`, each edge that faces another region (a panel, header, or footer) has the inner inset, and each open edge has the Layout-edge inset, where the Layout-edge inset comes from the Layout's `padding`, else the nearest padding container, and the inner inset from the nearest padding container (Card, Section, Dialog, Drawer, or BottomSheet), each spacing step 4 otherwise; a block edge beside a header or footer without a divider collapses to zero. A `padding` step replaces all four edges, and `0` removes them. The region publishes container-padding values equal to the padding it applies, excluding the content-width alignment gutter of FR3, which is applied but not published. Implementation gaps: with only a start panel the open inline-end edge applies the inner inset; the published values differ from the applied padding with only an end panel and beside a header or footer without a divider; and a nested Layout inherits an outer header's or footer's collapse, so its content sits flush against its own divider (Current-state impact). | Current source; `family:layout-regions` FR4, FR6; `architecture:container-padding` |
+| FR3 | When the Layout sets a content width, the region keeps its own box and scrollbar where `component:Layout` FR6 places them and aligns its children to that width through its inline padding, never less than its inset. With `padding={0}` it stays full bleed. | Current source and tests; `family:layout-regions` FR12 |
+| FR4 | `role` and `label` set the root's `role` and `aria-label`; LayoutContent adds no role of its own. | Current source and tests; `family:layout-regions` FR8 |
+| FR5 | `ref` reaches the root. Supported DOM, data, ARIA, and event props reach the root after the component's own attributes; `xstyle`, `className`, and `style` compose after component styles. | Current source and tests; `architecture:public-component-api` INV5–INV8 |
+
+### Allowed variation
+
+- **AV1 — Content.** Any caller content may fill the region.
+- **AV2 — Landmark.** The caller chooses whether the region is a landmark and
+ which one.
+
+### Representative states
+
+| State | Required invariant | Allowed variation |
+| ------------------------ | ----------------------------------------------------- | ----------------- |
+| Alone in a Layout | Layout-edge inset on every edge; scrolls. | Content. |
+| Beside panels | Inner inset toward each panel. | Panel count. |
+| Content width, no panels | Full-width scrollport; children aligned to the width. | Width. |
+| Full bleed | No padding; zero published inset. | — |
+| Main landmark | `role="main"` and the caller's name on the root. | Name. |
+
+### Transformation and precedence order
+
+- **ORD1 — Padding.** `padding` → automatic inset per edge (inner toward a
+ region, Layout-edge on an open side, zero beside a header or footer without
+ a divider); content-width alignment only increases inline padding.
+
+### Performance and resources
+
+- **PR1 — No external lifecycle.** LayoutContent reads which slots its Layout
+ fills and adds no listener, observer, timer, or measurement.
+
+## Accessibility contract
+
+- **AR1 — Explicit landmarks only.** The region is a landmark only when the
+ caller supplies `role`, named only by the caller's `label`
+ (`family:layout-regions` FR8).
+- **AR2 — Keyboard scrolling.** A scrolling region is a browser scroll
+ container, so its overflow scrolls with the keyboard once focus is inside
+ it or on it.
+
+## Design relationships
+
+| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
+| ---------------- | -------------------------------------- | ------------------------ | -------------- | ------------------ |
+| Content area | The main scrolling region of a Layout. | Current source and docs | Prominent | FR1–FR3 |
+
+Theming: the root carries the `layout-content` target, which `Layout.doc.mjs`
+declares and `component:Layout` maps. `LayoutContent.doc.mjs` declares no
+anatomy of its own, so no anatomy-theming block is declared here.
+
+## Family and system relationships
+
+- `family:layout-regions` owns region scrolling, padding replacement, divider
+ spacing, landmarks, and content-width scrollbar placement; FR1–FR4 and AR1
+ apply them.
+- `architecture:container-padding` owns inset publication; FR2 applies it and
+ records the gap.
+- `component:Layout` owns slot placement, the Layout-edge inset, content
+ width, and the `layout-content` target mapping.
+
+## Verification map
+
+| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
+| --------- | -------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
+| FR1 | `LayoutSlots.test.tsx` class, scroll-owner, and Layout-slot tests | Alone; in a Layout | A lost `layout-content` class, a non-scrolling default, or an inner wrapper around the children fails. Gap: `isScrollable={false}` and the fill sizing have no check. | `audit:LayoutContent/layout` |
+| FR2, ORD1 | `LayoutSlots.test.tsx` padding test | `padding={0}`; numeric padding | Gap: the padding test checks only that the region renders, and no test covers the automatic per-edge inset, the start-panel inline-end inset, the collapse beside a header or footer without a divider, or the published values. | `audit:LayoutContent/layout` |
+| FR3 | `contentWidth.test.tsx`; stable visual baseline `core-layout--content-width-scrollbar-placement` | No panels, one panel, both; zero padding | A content region that is not full width without panels, children not aligned, or a lost full bleed fails; a scrollbar moved off its edge comes back changed for review. | `audit:LayoutContent/layout` |
+| FR4, AR1 | `LayoutSlots.test.tsx` landmark test; `Layout.a11y.test.tsx` and `Layout.a11y.chromium.spec.ts` `content-main` state | Caller `main` role and label | A lost role or name fails, including at the accessibility tree. Gap: no test asserts that a region without `role` exposes none. | `audit:LayoutContent/accessibility` |
+| FR5 | `LayoutSlots.test.tsx` ref and className/style tests | Ref; caller class and style | A ref on another element, or a dropped class or style, fails. Gap: no test covers DOM, data, or event props, or the `xstyle` merge order. | `audit:LayoutContent/api` |
+| AR2, PR1 | Source review | Scrolling region | Gap: no automated check covers keyboard scrolling or fails if LayoutContent adds a listener or measurement. | `audit:LayoutContent/behavior` |
+
+## Decision log
+
+None recorded. The record describes shipped behavior.
+
+## Open questions
+
+None.
+
+## Content boundary
+
+This file does not duplicate consumer prop tables/examples, current audit
+results, implementation steps, Layout slot rules, or container-padding
+mechanics. It links to their owners.
diff --git a/packages/core/src/Layout/LayoutFooter.spec.md b/packages/core/src/Layout/LayoutFooter.spec.md
new file mode 100644
index 0000000000..266be2737c
--- /dev/null
+++ b/packages/core/src/Layout/LayoutFooter.spec.md
@@ -0,0 +1,190 @@
+---
+schema_version: 3
+template_version: 7
+kind: component
+id: component:LayoutFooter
+authority: current
+archive_reason: null
+superseded_by: null
+approved_by: cixzhang
+approved_at: 2026-10-30
+owners: [cixzhang]
+review_triggers: [public-api, behavior, layout, theming, accessibility]
+verified_by:
+ [
+ packages/core/src/Layout/LayoutSlots.test.tsx,
+ packages/core/src/Layout/Layout.test.tsx,
+ packages/core/src/Layout/__tests__/contentWidth.test.tsx,
+ packages/core/src/Layout/__tests__/Layout.a11y.test.tsx,
+ packages/core/src/Layout/__tests__/Layout.a11y.chromium.spec.ts,
+ scripts/check-knowledge.mjs,
+ ]
+modules: []
+families: [family:layout-regions]
+design_specs: []
+architecture:
+ [
+ architecture:container-padding,
+ architecture:component-theming-surface,
+ architecture:public-component-api,
+ ]
+contributing: []
+system_specs: [spec:AST-038]
+---
+
+# LayoutFooter component contract
+
+## Contract at a glance
+
+| Area | Contract |
+| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
+| Public contract | `children`, `hasDivider`, `height`, `padding`, `label`, `role`, root `BaseProps`, and a root `ref`. |
+| Behavior | A non-shrinking footer region whose inner wrapper applies and publishes the Layout inset and aligns to the Layout's content width. |
+| End-user impact | People see a footer that keeps its height below scrolling content, with content aligned to the page's readable width. |
+| Builder impact | None; the record describes shipped behavior. |
+| Compatibility/readiness | Released behavior recorded as current; no API, default, or output changes. Two implementation gaps are listed under Current-state impact. |
+| Review checks | Reject a footer that shrinks, a published inset that differs from the applied padding, an inferred landmark, or a lost divider default. |
+| Governing rules | `family:layout-regions` FR1, FR4–FR6, FR8; `architecture:container-padding`; `architecture:public-component-api` INV5–INV8. |
+
+This table is a review projection; the body below is authoritative.
+
+## Intent
+
+LayoutFooter is the optional footer region a caller places in a Layout's
+`footer` slot. It owns the footer's size, inset, divider, and caller-supplied
+landmark semantics; the caller owns its content.
+
+Consumer syntax and examples belong in `LayoutFooter.doc.mjs`.
+
+## Compatibility and migration
+
+- Released default preserved: `yes` — no divider unless a Layout default says
+ so, automatic inset, no landmark role.
+- Compatibility class: records shipped behavior; no public prop, default, DOM,
+ target, or styling output changes.
+- Controlled/uncontrolled behavior: not applicable
+- Migration decision: none
+
+Consumer migration instructions belong in consumer docs and release notes.
+
+## Current-state impact
+
+- **Caller `data-divider` overrides the reflected divider (FR5).** Caller
+ props spread after the component's `data-divider`, so a caller value replaces
+ it: `data-divider="false"` draws no line yet stops the middle row above
+ from collapsing its spacing, where `architecture:public-component-api` INV5
+ keeps component-owned behavior from being overwritten.
+- **Nested Layouts inherit the collapse (FR3).** When this footer has no
+ divider, Layouts nested in the middle row, including inside a Dialog,
+ Drawer, or BottomSheet opened from it, inherit its spacing collapse and sit
+ flush against their own dividers (`family:layout-regions` FR6;
+ `spec:AST-038` FR7).
+
+## Ownership boundary
+
+**Owns**
+
+- The footer root, which carries the `layout-footer` target that
+ `component:Layout` maps, and its inner padding wrapper.
+- Footer height, divider, inset, and caller-supplied role and label.
+
+**Does not own / non-goals**
+
+- Slot placement, the Layout-edge inset, content width, and the divider
+ default — owned by `component:Layout`.
+- Footer content and its meaning — owned by the caller.
+
+## Public concepts
+
+| Concept | Closed values or states | Meaning | Availability by variant/orientation/state | Default | Owner | Stability | Invalid-value behavior |
+| -------- | ------------------------------------- | --------------------------------------------------------------------------- | ----------------------------------------- | ------------------------- | ------------------------ | --------- | -------------------------------- |
+| Divider | `true`, `false`, unset | Draws a line on the footer's block-start edge. | Always | Layout default, else none | `component:LayoutFooter` | Stable | — |
+| Height | number (px); CSS length string; unset | Fixes the footer's block size. | Always | content height | `component:LayoutFooter` | Stable | — |
+| Inset | spacing step; `0`; unset | Uniform padding that replaces the automatic inset; `0` is full bleed. | Always | automatic | `component:LayoutFooter` | Stable | Closed union; rejected by types. |
+| Landmark | caller `role` and `label` | Exposes the footer as the role the caller names, with that accessible name. | Always | none | caller | Stable | — |
+
+## Behavioral and layout contract
+
+| ID | Invariant | Basis |
+| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
+| FR1 | LayoutFooter renders a root `div` carrying the `layout-footer` target that does not shrink, around an inner `div` that holds the children, has the Layout's content width as its maximum width, and centers within the root. `height` fixes the root's block size, with numbers as pixels. | Current source and tests |
+| FR2 | Without `padding`, the inner wrapper's inline and block-end padding is the Layout-edge inset and its block-start padding is the inner inset, where the Layout-edge inset comes from the Layout's `padding`, else the nearest padding container, and the inner inset from the nearest padding container (Card, Section, Dialog, Drawer, or BottomSheet), each spacing step 4 otherwise. A `padding` step replaces all four edges, and `0` removes them. The wrapper publishes container-padding values equal to the padding it applies. | Current source and tests; `family:layout-regions` FR4; `architecture:container-padding` |
+| FR3 | A divider draws a 1px solid `--color-border` line on the root's block-start edge and reflects `data-divider="true"`. `hasDivider` decides; when unset, the nearest Layout `defaultHasDividers` in the same layer decides (the default stops at a layer boundary, `spec:AST-038` FR7); otherwise there is no divider. A footer without a divider lets the middle row above it collapse its block-end spacing. Implementation gap: Layouts nested in that middle row, including inside a Dialog, Drawer, or BottomSheet opened from it, inherit the collapse (`component:LayoutContent` Current-state impact; `spec:AST-038` FR7). | Current source and tests; `family:layout-regions` FR6 |
+| FR4 | `role` and `label` set the root's `role` and `aria-label`; LayoutFooter adds no role of its own. | Current source and tests; `family:layout-regions` FR8 |
+| FR5 | `ref` reaches the root. Supported DOM, data, ARIA, and event props reach the root, `xstyle`, `className`, and `style` compose after component styles, and the reflected `data-divider` stays component-owned (`architecture:public-component-api` INV5). Implementation gap: caller props spread after `data-divider`, so a caller `data-divider` replaces the reflected value and changes the neighbouring spacing collapse (Current-state impact). | Current source and tests; `architecture:public-component-api` INV5–INV8 |
+
+### Allowed variation
+
+- **AV1 — Content.** Any caller content may fill the footer.
+- **AV2 — Landmark.** The caller chooses whether the footer is a landmark and
+ which one.
+
+### Representative states
+
+| State | Required invariant | Allowed variation |
+| -------------------- | ------------------------------------------------------- | ----------------- |
+| Default in Layout | Automatic inset, no divider, no role. | Content. |
+| With divider | Block-start line and `data-divider="true"`. | — |
+| Explicit padding | Uniform padding, published to children. | Step. |
+| Contentinfo landmark | `role="contentinfo"` and the caller's name on the root. | Name. |
+
+### Transformation and precedence order
+
+- **ORD1 — Divider.** `hasDivider` → Layout `defaultHasDividers` → none.
+- **ORD2 — Padding.** `padding` → the automatic inset.
+
+### Performance and resources
+
+- **PR1 — No external lifecycle.** LayoutFooter reads the divider default from
+ its Layout and adds no listener, observer, timer, or measurement.
+
+## Accessibility contract
+
+- **AR1 — Explicit landmarks only.** The footer is a landmark only when the
+ caller supplies `role`, and it is named only by the caller's `label`
+ (`family:layout-regions` FR8).
+
+## Design relationships
+
+| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
+| ---------------- | --------------------------------------------------------- | ------------------------ | -------------- | ------------------ |
+| Footer | A fixed footer band with an optional block-start divider. | Current source and docs | Supporting | FR1–FR3 |
+
+Theming: the root carries the `layout-footer` target, which `Layout.doc.mjs`
+declares and `component:Layout` maps. `LayoutFooter.doc.mjs` declares no anatomy
+of its own, so no anatomy-theming block is declared here.
+
+## Family and system relationships
+
+- `family:layout-regions` owns region boundaries, padding replacement, divider
+ spacing, and landmark rules; FR2–FR4 and AR1 apply them.
+- `architecture:container-padding` owns inset publication; FR2 applies it.
+- `component:Layout` owns slot placement, the Layout-edge inset, content
+ width, the divider default, and the `layout-footer` target mapping.
+- `architecture:public-component-api` owns caller-input routing; FR5 applies
+ it.
+
+## Verification map
+
+| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
+| --------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
+| FR1 | `LayoutSlots.test.tsx` class test; `contentWidth.test.tsx` LayoutFooter inner-wrapper and divider tests | Default; content width | A lost `layout-footer` class, children placed on the root instead of the inner wrapper, or a divider off the outer element fails. Gap: `height`, the non-shrinking root, the content-width maximum, and centering have no check. | `audit:LayoutFooter/layout` |
+| FR2, ORD2 | Source review | Automatic, explicit, and zero padding | Gap: no test covers the automatic inset, the `padding` replacement, full bleed, or the published values. | `audit:LayoutFooter/layout` |
+| FR3, ORD1 | `LayoutSlots.test.tsx` and `Layout.test.tsx` divider tests | Default; `hasDivider`; Layout default | A missing or unexpected `data-divider`, or an ignored Layout default, fails. Gap: no test covers an explicit `false` beating a Layout default on a footer. Gap: the line's paint and the collapsed spacing above a footer without a divider have no check. No test covers the default stopping at a layer boundary or the inherited nested collapse. | `audit:LayoutFooter/layout` |
+| FR4, AR1 | `LayoutSlots.test.tsx` landmark test; `Layout.a11y.test.tsx` and `Layout.a11y.chromium.spec.ts` `footer-contentinfo` state | Caller `contentinfo` role and label | A lost role or name fails, including at the accessibility tree. Gap: no test asserts that a footer without `role` exposes none. | `audit:LayoutFooter/accessibility` |
+| FR5 | `LayoutSlots.test.tsx` ref test | Ref | A ref on another element fails. Gap: no test covers `className`, `style`, DOM, data, or event props, or the `xstyle` merge order. No test covers a caller `data-divider`. | `audit:LayoutFooter/api` |
+| PR1 | Source review | Every state | Gap: no automated check fails if LayoutFooter adds a listener, timer, or measurement. | `audit:LayoutFooter/behavior` |
+
+## Decision log
+
+None recorded. The record describes shipped behavior.
+
+## Open questions
+
+None.
+
+## Content boundary
+
+This file does not duplicate consumer prop tables/examples, current audit
+results, implementation steps, Layout slot rules, or container-padding
+mechanics. It links to their owners.
diff --git a/packages/core/src/Layout/LayoutHeader.spec.md b/packages/core/src/Layout/LayoutHeader.spec.md
new file mode 100644
index 0000000000..93ba8031a0
--- /dev/null
+++ b/packages/core/src/Layout/LayoutHeader.spec.md
@@ -0,0 +1,193 @@
+---
+schema_version: 3
+template_version: 7
+kind: component
+id: component:LayoutHeader
+authority: current
+archive_reason: null
+superseded_by: null
+approved_by: cixzhang
+approved_at: 2026-10-30
+owners: [cixzhang]
+review_triggers: [public-api, behavior, layout, theming, accessibility]
+verified_by:
+ [
+ packages/core/src/Layout/LayoutSlots.test.tsx,
+ packages/core/src/Layout/Layout.test.tsx,
+ packages/core/src/Layout/__tests__/contentWidth.test.tsx,
+ packages/core/src/Layout/__tests__/Layout.a11y.test.tsx,
+ packages/core/src/Layout/__tests__/Layout.a11y.chromium.spec.ts,
+ scripts/check-knowledge.mjs,
+ ]
+modules: []
+families: [family:layout-regions]
+design_specs: []
+architecture:
+ [
+ architecture:container-padding,
+ architecture:component-theming-surface,
+ architecture:public-component-api,
+ ]
+contributing: []
+system_specs: [spec:AST-038]
+---
+
+# LayoutHeader component contract
+
+## Contract at a glance
+
+| Area | Contract |
+| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
+| Public contract | `children`, `hasDivider`, `height`, `padding`, `paddingBlockEnd`, `label`, `role`, root `BaseProps`, and a root `ref`. |
+| Behavior | A non-shrinking header region whose inner wrapper applies and publishes the Layout inset and aligns to the Layout's content width. |
+| End-user impact | People see a header that keeps its height above scrolling content, with content aligned to the page's readable width. |
+| Builder impact | None; the record describes shipped behavior. |
+| Compatibility/readiness | Released behavior recorded as current; no API, default, or output changes. Two implementation gaps are listed under Current-state impact. |
+| Review checks | Reject a header that shrinks, a published inset that differs from the applied padding, an inferred landmark, or a lost divider default. |
+| Governing rules | `family:layout-regions` FR1, FR4–FR6, FR8; `architecture:container-padding`; `architecture:public-component-api` INV5–INV8. |
+
+This table is a review projection; the body below is authoritative.
+
+## Intent
+
+LayoutHeader is the optional header region a caller places in a Layout's
+`header` slot. It owns the header's size, inset, divider, and caller-supplied
+landmark semantics; the caller owns its content.
+
+Consumer syntax and examples belong in `LayoutHeader.doc.mjs`.
+
+## Compatibility and migration
+
+- Released default preserved: `yes` — no divider unless a Layout default says
+ so, automatic inset, no landmark role.
+- Compatibility class: records shipped behavior; no public prop, default, DOM,
+ target, or styling output changes.
+- Controlled/uncontrolled behavior: not applicable
+- Migration decision: none
+
+Consumer migration instructions belong in consumer docs and release notes.
+
+## Current-state impact
+
+- **Caller `data-divider` overrides the reflected divider (FR5).** Caller
+ props spread after the component's `data-divider`, so a caller value replaces
+ it: `data-divider="false"` draws no line yet stops the middle row below
+ from collapsing its spacing, where `architecture:public-component-api` INV5
+ keeps component-owned behavior from being overwritten.
+- **Nested Layouts inherit the collapse (FR3).** When this header has no
+ divider, Layouts nested in the middle row, including inside a Dialog,
+ Drawer, or BottomSheet opened from it, inherit its spacing collapse and sit
+ flush against their own dividers (`family:layout-regions` FR6;
+ `spec:AST-038` FR7).
+
+## Ownership boundary
+
+**Owns**
+
+- The header root, which carries the `layout-header` target that
+ `component:Layout` maps, and its inner padding wrapper.
+- Header height, divider, inset, and caller-supplied role and label.
+
+**Does not own / non-goals**
+
+- Slot placement, the Layout-edge inset, content width, and the divider
+ default — owned by `component:Layout`.
+- Header content and its meaning — owned by the caller.
+
+## Public concepts
+
+| Concept | Closed values or states | Meaning | Availability by variant/orientation/state | Default | Owner | Stability | Invalid-value behavior |
+| --------------- | ------------------------------------- | --------------------------------------------------------------------------- | ----------------------------------------- | ------------------------- | ------------------------ | --------- | -------------------------------- |
+| Divider | `true`, `false`, unset | Draws a line on the header's block-end edge. | Always | Layout default, else none | `component:LayoutHeader` | Stable | — |
+| Height | number (px); CSS length string; unset | Fixes the header's block size. | Always | content height | `component:LayoutHeader` | Stable | — |
+| Inset | spacing step; `0`; unset | Uniform padding that replaces the automatic inset; `0` is full bleed. | Always | automatic | `component:LayoutHeader` | Stable | Closed union; rejected by types. |
+| Block-end inset | spacing step; unset | Replaces the block-end padding alone. | Always | automatic | `component:LayoutHeader` | Stable | Closed union; rejected by types. |
+| Landmark | caller `role` and `label` | Exposes the header as the role the caller names, with that accessible name. | Always | none | caller | Stable | — |
+
+## Behavioral and layout contract
+
+| ID | Invariant | Basis |
+| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
+| FR1 | LayoutHeader renders a root `div` carrying the `layout-header` target that does not shrink, around an inner `div` that holds the children, has the Layout's content width as its maximum width, and centers within the root. `height` fixes the root's block size, with numbers as pixels. | Current source and tests |
+| FR2 | Without `padding`, the inner wrapper's inline and block-start padding is the Layout-edge inset and its block-end padding is the inner inset, where the Layout-edge inset comes from the Layout's `padding`, else the nearest padding container, and the inner inset from the nearest padding container (Card, Section, Dialog, Drawer, or BottomSheet), each spacing step 4 otherwise. A `padding` step replaces all four edges, and `0` removes them. `paddingBlockEnd` replaces the block-end edge alone. The wrapper publishes container-padding values equal to the padding it applies. | Current source and tests; `family:layout-regions` FR4; `architecture:container-padding` |
+| FR3 | A divider draws a 1px solid `--color-border` line on the root's block-end edge and reflects `data-divider="true"`. `hasDivider` decides; when unset, the nearest Layout `defaultHasDividers` in the same layer decides (the default stops at a layer boundary, `spec:AST-038` FR7); otherwise there is no divider. A header without a divider lets the middle row below it collapse its block-start spacing. Implementation gap: Layouts nested in that middle row, including inside a Dialog, Drawer, or BottomSheet opened from it, inherit the collapse (`component:LayoutContent` Current-state impact; `spec:AST-038` FR7). | Current source and tests; `family:layout-regions` FR6 |
+| FR4 | `role` and `label` set the root's `role` and `aria-label`; LayoutHeader adds no role of its own. | Current source and tests; `family:layout-regions` FR8 |
+| FR5 | `ref` reaches the root. Supported DOM, data, ARIA, and event props reach the root, `xstyle`, `className`, and `style` compose after component styles, and the reflected `data-divider` stays component-owned (`architecture:public-component-api` INV5). Implementation gap: caller props spread after `data-divider`, so a caller `data-divider` replaces the reflected value and changes the neighbouring spacing collapse (Current-state impact). | Current source and tests; `architecture:public-component-api` INV5–INV8 |
+
+### Allowed variation
+
+- **AV1 — Content.** Any caller content may fill the header.
+- **AV2 — Landmark.** The caller chooses whether the header is a landmark and
+ which one.
+
+### Representative states
+
+| State | Required invariant | Allowed variation |
+| ----------------- | -------------------------------------------------- | ----------------- |
+| Default in Layout | Automatic inset, no divider, no role. | Content. |
+| With divider | Block-end line and `data-divider="true"`. | — |
+| Explicit padding | Uniform padding, published to children. | Step. |
+| `paddingBlockEnd` | Only the block-end edge changes. | Step. |
+| Banner landmark | `role="banner"` and the caller's name on the root. | Name. |
+
+### Transformation and precedence order
+
+- **ORD1 — Divider.** `hasDivider` → Layout `defaultHasDividers` → none.
+- **ORD2 — Padding.** `paddingBlockEnd` for block-end → `padding` → the
+ automatic inset.
+
+### Performance and resources
+
+- **PR1 — No external lifecycle.** LayoutHeader reads the divider default from
+ its Layout and adds no listener, observer, timer, or measurement.
+
+## Accessibility contract
+
+- **AR1 — Explicit landmarks only.** The header is a landmark only when the
+ caller supplies `role`, and it is named only by the caller's `label`
+ (`family:layout-regions` FR8).
+
+## Design relationships
+
+| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
+| ---------------- | ------------------------------------------------------- | ------------------------ | -------------- | ------------------ |
+| Header | A fixed header band with an optional block-end divider. | Current source and docs | Supporting | FR1–FR3 |
+
+Theming: the root carries the `layout-header` target, which `Layout.doc.mjs`
+declares and `component:Layout` maps. `LayoutHeader.doc.mjs` declares no anatomy
+of its own, so no anatomy-theming block is declared here.
+
+## Family and system relationships
+
+- `family:layout-regions` owns region boundaries, padding replacement, divider
+ spacing, and landmark rules; FR2–FR4 and AR1 apply them.
+- `architecture:container-padding` owns inset publication; FR2 applies it.
+- `component:Layout` owns slot placement, the Layout-edge inset, content
+ width, the divider default, and the `layout-header` target mapping.
+- `architecture:public-component-api` owns caller-input routing; FR5 applies
+ it.
+
+## Verification map
+
+| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
+| --------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
+| FR1 | `LayoutSlots.test.tsx` class, height, and inner-wrapper tests; `contentWidth.test.tsx` LayoutHeader inner-wrapper and divider tests | Default; numeric height | A lost `layout-header` class, a missing pixel height, children placed directly on the root, or a divider off the outer element fails. Gap: the non-shrinking root, the content-width maximum, and centering have no check. | `audit:LayoutHeader/layout` |
+| FR2, ORD2 | `Layout.test.tsx` `paddingBlockEnd` tests | `paddingBlockEnd` alone and with `padding` | A `paddingBlockEnd` that adds no class, changes more than the block-end edge, or leaves the shared per-edge family fails. Gap: the automatic inset, the `padding` replacement, full bleed, and the published values have no check. | `audit:LayoutHeader/layout` |
+| FR3, ORD1 | `LayoutSlots.test.tsx` and `Layout.test.tsx` divider tests | Default; `hasDivider`; Layout default; explicit `false` | A missing or unexpected `data-divider`, an ignored Layout default, or an explicit `false` that loses fails. Gap: the line's paint and the collapsed spacing below a header without a divider have no check. No test covers the default stopping at a layer boundary or the inherited nested collapse. | `audit:LayoutHeader/layout` |
+| FR4, AR1 | `LayoutSlots.test.tsx` landmark test; `Layout.a11y.test.tsx` and `Layout.a11y.chromium.spec.ts` `header-banner` state | Caller `banner` role and label | A lost role or name fails, including at the accessibility tree. Gap: no test asserts that a header without `role` exposes none. | `audit:LayoutHeader/accessibility` |
+| FR5 | `LayoutSlots.test.tsx` ref and className tests | Ref; caller class | A ref on another element or a dropped class fails. Gap: no test covers DOM, data, or event props, `style`, or the `xstyle` merge order. No test covers a caller `data-divider`. | `audit:LayoutHeader/api` |
+| PR1 | Source review | Every state | Gap: no automated check fails if LayoutHeader adds a listener, timer, or measurement. | `audit:LayoutHeader/behavior` |
+
+## Decision log
+
+None recorded. The record describes shipped behavior.
+
+## Open questions
+
+None.
+
+## Content boundary
+
+This file does not duplicate consumer prop tables/examples, current audit
+results, implementation steps, Layout slot rules, or container-padding
+mechanics. It links to their owners.
diff --git a/packages/core/src/Layout/LayoutPanel.spec.md b/packages/core/src/Layout/LayoutPanel.spec.md
new file mode 100644
index 0000000000..6a74d0688d
--- /dev/null
+++ b/packages/core/src/Layout/LayoutPanel.spec.md
@@ -0,0 +1,194 @@
+---
+schema_version: 3
+template_version: 7
+kind: component
+id: component:LayoutPanel
+authority: current
+archive_reason: null
+superseded_by: null
+approved_by: cixzhang
+approved_at: 2026-10-30
+owners: [cixzhang]
+review_triggers: [public-api, behavior, layout, theming, accessibility]
+verified_by:
+ [
+ packages/core/src/Layout/LayoutSlots.test.tsx,
+ packages/core/src/Layout/__tests__/Layout.a11y.test.tsx,
+ packages/core/src/Layout/__tests__/Layout.a11y.chromium.spec.ts,
+ scripts/check-knowledge.mjs,
+ ]
+modules: []
+families: [family:layout-regions]
+design_specs: []
+architecture:
+ [
+ architecture:container-padding,
+ architecture:component-theming-surface,
+ architecture:public-component-api,
+ ]
+contributing: []
+system_specs: []
+---
+
+# LayoutPanel component contract
+
+## Contract at a glance
+
+| Area | Contract |
+| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
+| Public contract | `children`, `width`, `resizable`, `hasDivider`, `isScrollable`, `padding`, `label`, `role`, root `BaseProps`, and a root `ref`. |
+| Behavior | A fixed-width side region at logical start or end that scrolls by default, with an optional divider on its content-facing edge. |
+| End-user impact | People see a side panel that keeps its width, scrolls on its own, and mirrors to the other side in right-to-left. |
+| Builder impact | None; the record describes shipped behavior. |
+| Compatibility/readiness | Released behavior recorded as current; no API, default, or output changes. Two implementation gaps are listed under Current-state impact. |
+| Review checks | Reject a divider on the outer edge, a panel that shrinks, an inferred landmark, `width` beating `resizable`, or a further publication mismatch. |
+| Governing rules | `family:layout-regions` FR1, FR2, FR4–FR8, FR10; `architecture:container-padding`; `architecture:public-component-api` INV5–INV8. |
+
+This table is a review projection; the body below is authoritative.
+
+## Intent
+
+LayoutPanel is the side region a caller places in a Layout's `start` or `end`
+slot. It owns the panel's width, inset, scrolling, divider, and
+caller-supplied landmark semantics; the caller owns its content.
+
+Consumer syntax and examples belong in `LayoutPanel.doc.mjs`.
+
+## Compatibility and migration
+
+- Released default preserved: `yes` — no divider, scrollable, automatic
+ inset, content width.
+- Compatibility class: records shipped behavior; no public prop, default, DOM,
+ target, or styling output changes.
+- Controlled/uncontrolled behavior: not applicable
+- Migration decision: none
+
+Consumer migration instructions belong in consumer docs and release notes.
+
+## Current-state impact
+
+- **Published inset differs from applied padding (FR3).** On the automatic
+ path a panel applies the Layout-edge inset on its outer inline edge and on
+ a block edge with no header or footer, but publishes the inner inset on
+ every edge. A full-bleed child then lines up against a value that differs
+ from the padding the panel applies, where `architecture:container-padding`
+ has a region publish its applied padding.
+- **Two divider owners can paint one boundary (FR4).** A panel with
+ `hasDivider` beside a ResizeHandle that draws the same line paints the
+ boundary twice; nothing prevents it, so callers keep `hasDivider={false}`
+ when the ResizeHandle owns the line (`family:layout-regions` FR5).
+
+## Ownership boundary
+
+**Owns**
+
+- The panel root, which carries the `layout-panel` target that
+ `component:Layout` maps.
+- Panel width, inset, scrolling, divider, and caller-supplied role and label.
+
+**Does not own / non-goals**
+
+- Slot placement and the Layout-edge inset — owned by `component:Layout`.
+- Resize interaction and the resize handle — owned by useResizable and
+ ResizeHandle (`family:layout-regions` FR10).
+- Panel content and its meaning — owned by the caller.
+
+## Public concepts
+
+| Concept | Closed values or states | Meaning | Availability by variant/orientation/state | Default | Owner | Stability | Invalid-value behavior |
+| --------- | ------------------------------------- | -------------------------------------------------------------------------- | ----------------------------------------- | ------------- | ----------------------- | --------- | -------------------------------- |
+| Width | number (px); CSS length string; unset | The panel's inline size. | Always | content width | `component:LayoutPanel` | Stable | — |
+| Resizable | the value from useResizable | Supplies a resizable width that wins over `width`. | Always | none | `component:LayoutPanel` | Stable | — |
+| Divider | `true`, `false` | Draws a line on the panel's content-facing edge. | Start or end slot | `false` | `component:LayoutPanel` | Stable | — |
+| Scrolling | `true`, `false` | Scrolls overflow, or clips it. | Always | `true` | `component:LayoutPanel` | Stable | — |
+| Inset | spacing step; `0`; unset | Uniform padding that replaces the automatic inset; `0` is full bleed. | Always | automatic | `component:LayoutPanel` | Stable | Closed union; rejected by types. |
+| Landmark | caller `role` and `label` | Exposes the panel as the role the caller names, with that accessible name. | Always | none | caller | Stable | — |
+
+## Behavioral and layout contract
+
+| ID | Invariant | Basis |
+| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
+| FR1 | LayoutPanel renders one `div` carrying the `layout-panel` target that does not shrink and holds the children directly. `width` sets its inline size, with numbers as pixels; a `resizable` value's size wins over `width`. It scrolls overflow by default; `isScrollable={false}` clips it. | Current source and tests; `family:layout-regions` FR7, FR10 |
+| FR2 | In the `start` slot the panel's content-facing edge is its inline end; in the `end` slot it is its inline start; both follow writing direction. | Current source and tests; `family:layout-regions` FR2 |
+| FR3 | Without `padding`, the panel's outer inline edge has the Layout-edge inset, a block edge with no header or footer beside it has the Layout-edge inset, and other edges have the inner inset, where the Layout-edge inset comes from the Layout's `padding`, else the nearest padding container, and the inner inset from the nearest padding container (Card, Section, Dialog, Drawer, or BottomSheet), each spacing step 4 otherwise. A `padding` step replaces all four edges, and `0` removes them. The panel publishes container-padding values equal to the padding it applies. Implementation gap: on the automatic path it publishes the inner inset on every edge (Current-state impact). | Current source; `family:layout-regions` FR4; `architecture:container-padding` |
+| FR4 | `hasDivider` draws a 1px solid `--color-border` line on the content-facing edge; LayoutPanel does not read a Layout divider default. Without a divider and with the automatic inset, the panel overlaps the content area by the inner inset so the two share one gap. One boundary has one divider owner (`family:layout-regions` FR5). Implementation gap: nothing prevents a panel divider and an adjacent ResizeHandle line from both painting (Current-state impact). | Current source and docs; `family:layout-regions` FR5, FR6 |
+| FR5 | `role` and `label` set the root's `role` and `aria-label`; LayoutPanel adds no role of its own. | Current source and tests; `family:layout-regions` FR8 |
+| FR6 | `ref` reaches the root. Supported DOM, data, ARIA, and event props reach the root after the component's own attributes; `xstyle`, `className`, and `style` compose after component styles. | Current source and tests; `architecture:public-component-api` INV5–INV8 |
+
+### Allowed variation
+
+- **AV1 — Content.** Any caller content may fill the panel.
+- **AV2 — Position.** The caller places the panel at start, end, or both.
+
+### Representative states
+
+| State | Required invariant | Allowed variation |
+| ------------------- | ------------------------------------------------------ | ----------------- |
+| Start panel | Divider and shared gap on the inline-end edge. | Width. |
+| End panel | Divider and shared gap on the inline-start edge. | Width. |
+| Right-to-left | Start and end mirror. | — |
+| Resizable | The resizable size sets the width. | Size. |
+| Navigation landmark | `role="navigation"` and the caller's name on the root. | Name. |
+
+### Transformation and precedence order
+
+- **ORD1 — Width.** `resizable` size → `width` → content width.
+- **ORD2 — Padding.** `padding` → automatic inset per edge.
+
+### Performance and resources
+
+- **PR1 — No external lifecycle.** LayoutPanel reads its slot and which slots
+ its Layout fills, and adds no listener, observer, timer, or measurement of
+ its own.
+
+## Accessibility contract
+
+- **AR1 — Explicit landmarks only.** The panel is a landmark only when the
+ caller supplies `role`, named only by the caller's `label`
+ (`family:layout-regions` FR8).
+
+## Design relationships
+
+| Anatomy or state | Design requirement | Representation authority | Hierarchy role | Component contract |
+| ---------------- | ------------------------------------------------------------ | ------------------------ | -------------- | ------------------ |
+| Panel | A fixed side region with an optional content-facing divider. | Current source and docs | Supporting | FR1–FR4 |
+
+Theming: the root carries the `layout-panel` target, which `Layout.doc.mjs`
+declares and `component:Layout` maps. `LayoutPanel.doc.mjs` declares no anatomy
+of its own, so no anatomy-theming block is declared here.
+
+## Family and system relationships
+
+- `family:layout-regions` owns region direction, padding replacement,
+ boundary ownership, divider spacing, scrolling, landmarks, and resize
+ delegation; FR1–FR5 and AR1 apply them.
+- `architecture:container-padding` owns inset publication; FR3 applies it and
+ records the gap.
+- `component:Layout` owns slot placement, the Layout-edge inset, and the
+ `layout-panel` target mapping.
+
+## Verification map
+
+| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
+| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
+| FR1, ORD1 | `LayoutSlots.test.tsx` class, width, and resizable tests | Numeric and string width; resizable | A lost `layout-panel` class, a missing width, or `width` beating `resizable` fails. Gap: the non-shrinking root, scrolling, and `isScrollable={false}` have no check. No requirement or check covers how a keyboard user reaches a scrolling panel's overflow when the panel holds no focusable content. | `audit:LayoutPanel/layout` |
+| FR2 | `LayoutSlots.test.tsx` start- and end-slot tests; `Layout.a11y.chromium.spec.ts` `start-end-navigation-rtl` state | Start and end panels; right-to-left | A panel that fails to render in either slot fails. Gap: no check asserts which edge carries the divider or the shared gap, or the mirrored placement. | `audit:LayoutPanel/layout` |
+| FR3, ORD2 | Source review | Automatic, explicit, and zero padding | Gap: no test covers the automatic per-edge inset, the `padding` replacement, full bleed, or the published values. | `audit:LayoutPanel/layout` |
+| FR4 | Source review | `hasDivider`; no divider | Gap: no test covers the divider line, the shared gap, or a panel divider beside a ResizeHandle. | `audit:LayoutPanel/layout` |
+| FR5, AR1 | `LayoutSlots.test.tsx` landmark test; `Layout.a11y.test.tsx` and `Layout.a11y.chromium.spec.ts` `start-end-navigation-rtl` and `nested-panel-region` states | Caller `navigation` and `region` roles and labels | A lost role or name fails, including at the accessibility tree. Gap: no test asserts that a panel without `role` exposes none. | `audit:LayoutPanel/accessibility` |
+| FR6 | `LayoutSlots.test.tsx` ref and className tests | Ref; caller class | A ref on another element or a dropped class fails. Gap: no test covers `style`, DOM, data, or event props, or the `xstyle` merge order. | `audit:LayoutPanel/api` |
+| PR1 | Source review | Every state | Gap: no automated check fails if LayoutPanel adds a listener, timer, or measurement. | `audit:LayoutPanel/behavior` |
+
+## Decision log
+
+None recorded. The record describes shipped behavior.
+
+## Open questions
+
+None.
+
+## Content boundary
+
+This file does not duplicate consumer prop tables/examples, current audit
+results, implementation steps, Layout slot rules, resize interaction, or
+container-padding mechanics. It links to their owners.