Layout

Layout & Structure
stable

Root layout container that coordinates space-reservation for registered layout items (Drawer, AppBar, BottomNav, SystemBar). Pushes content automatically via CSS custom properties.

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamLayoutSchematic of the Layout component with its wrapper child and registered layout items. SystemBar / AppBar (layout item) Drawer (layout item) origam-layout__wrapper → origam-main + slot content 1 2
Anatomy of <origam-layout> — root wrapper (①) + inner __wrapper (②) that receives the content. Layout items (Drawer, AppBar…) register themselves and carve space via CSS vars.
1.origam-layout
Root <div>. Emits --origam-layout---position-{top,right,bottom,left} CSS vars reflecting each registered item's reserved space.
2.origam-layout__wrapper
Inner wrapper — width: 100%; height: 100%. In full-height mode switches to 100vw / 100vh.

API

Props

All props accepted by this component, with their type, default value and description.

overlaps
Array<string>
List of layout item IDs that should overlap rather than push the content area.
fullHeight
boolean
false
Switches the root and wrapper to 100vw / 100vh, filling the entire viewport.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
height
number | string
Overrides the layout height. Accepts a CSS length or a number (→ px).
maxHeight
number | string
Maximum layout height.
maxWidth
number | string
Maximum layout width.
minHeight
number | string
Minimum layout height.
minWidth
number | string
Minimum layout width.
width
number | string
Overrides the layout width.
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
Border-radius token or boolean.
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
elevation
TElevation
Box-shadow elevation token applied to the layout root.
bgColor
Background color of the layout root.
color
Foreground color inherited by children.
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
false
Applies a border to the layout root.
borderTop
boolean | number | string
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderColor
string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor

API

Slots

Content slots exposed by this component.

#default
Primary content area. Place layout items (Drawer, AppBar, OrigamMain…) here.

API

Exposed members

Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.

(id: string) => ILayerItem | undefined
Returns the layout metadata (position, size, id) of a registered item by its string ID.
Ref<Array<ILayerItem>>
Reactive array of all registered layout items with their current positions and sizes.
<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to a child component.
Ref<string>
Reactive CSS string generated by useStyle.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet. Called automatically on mount.
() => void
Removes the injected style sheet. Called automatically on unmount.
Ref<boolean>
True once the style sheet has been injected into the DOM.

Customisation

CSS variables

CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.

Layout background color.
Space reserved at the top by registered layout items (e.g. AppBar height). Consumed by OrigamMain as padding-block-start.
Space reserved at the bottom (e.g. BottomNav height). Consumed by OrigamMain as padding-block-end.
Space reserved on the left (e.g. Drawer width). Consumed by OrigamMain as padding-inline-start.
Space reserved on the right (e.g. rail nav width). Consumed by OrigamMain as padding-inline-end.

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

Keyboard interactions

Keyboard interactions
KeyAction
TabTab navigation flows through the interactive children inside the layout (drawer toggles, nav items, main content).

Notes

  • OrigamLayout renders as a plain <div> — no ARIA landmark role. Use <origam-main> (renders as <main>) and <origam-system-bar> to provide landmark semantics for assistive technologies.

Foundation

Design tokens

Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.

Source
color
var(--origam-color__surface---default)
Default background color for the layout root.
other
flex
Layout display mode (flex, column).
other
100vw
Wrapper width in full-height mode.
other
100vh
Wrapper height in full-height mode.

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Basic page layout

vue

Scrollable main area

vue