Layout
Root layout container that coordinates space-reservation for registered layout items (Drawer, AppBar, BottomNav, SystemBar). Pushes content automatically via CSS custom properties.
Structure
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<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%. Infull-heightmode switches to100vw / 100vh.
API
Props
Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.
- overlapsArray<string>
- List of layout item IDs that should overlap rather than push the content area.
- fullHeightbooleanfalse
- Switches the root and wrapper to 100vw / 100vh, filling the entire viewport.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- heightnumber | string
- Overrides the layout height. Accepts a CSS length or a number (→ px).
- maxHeightnumber | string
- Maximum layout height.
- maxWidthnumber | string
- Maximum layout width.
- minHeightnumber | string
- Minimum layout height.
- minWidthnumber | string
- Minimum layout width.
- widthnumber | string
- Overrides the layout width.
- marginboolean | number | string
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- paddingboolean | number | string
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- Border-radius token or boolean.
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | number | string
- elevationTElevation
- Box-shadow elevation token applied to the layout root.
- bgColor
- Background color of the layout root.
- color
- Foreground color inherited by children.
- borderboolean | number | string | TDirectionBoth | Array<TDirectionBoth>false
- Applies a border to the layout root.
- borderTopboolean | number | string
- borderLeftboolean | number | string
- borderBottomboolean | number | string
- borderRightboolean | number | string
- borderBlockboolean | number | string
- borderInlineboolean | number | string
- borderInlineStartboolean | number | string
- borderInlineEndboolean | number | string
- borderBlockStartboolean | number | string
- borderBlockEndboolean | number | string
- borderColorstring
- borderStylestring
- borderTopColorTColor
- borderRightColorTColor
- borderBottomColorTColor
- borderLeftColorTColor
- borderInlineStartColorTColor
- borderInlineEndColorTColor
- borderBlockStartColorTColor
- borderBlockEndColorTColor
API
Slots
Emplacements de contenu exposés par ce composant.
- #default
- Primary content area. Place layout items (Drawer, AppBar, OrigamMain…) here.
API
Membres exposés
Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.
- (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.
Personnalisation
Variables CSS
Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.
- 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
Accessibilité
Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.
Interactions clavier
| Touche | Action |
|---|---|
| Tab | Tab 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.
Fondation
Design tokens
Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.
- colorvar(--origam-color__surface---default)
- Default background color for the layout root.
- otherflex
- Layout display mode (flex, column).
- other100vw
- Wrapper width in full-height mode.
- other100vh
- Wrapper height in full-height mode.
Interactif
Playground
Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.
Rendu de l’aperçu en cours…
Usage
Exemples
Extraits de code prêts à coller dans vos templates.
Basic page layout
Scrollable main area