layout — wyrd.component.container

Container

Layout primitive that constrains content width and applies inline padding using the normative Layout DSL scales.

Install @wyrd-company/react or the Flutter package and use it directly — your DESIGN.md does the styling.

01

Examples

Generated from the contract's examples block. Previews are the published @wyrd-company/react component, themed by the brand's role tokens — flip the site's light/dark toggle and they follow.

Code target Applies to every example on component pages.
default state: default
A centered reading column for design-system guidance.
Usage
import { WyrdContainer } from "@wyrd-company/react";

<WyrdContainer maxWidth="lg" padding={2}>
  A centered reading column for design-system guidance.
</WyrdContainer>
narrow state: default
Narrow content with compact inline padding.
Usage
import { WyrdContainer } from "@wyrd-company/react";

<WyrdContainer maxWidth="sm" padding={1}>
  Narrow content with compact inline padding.
</WyrdContainer>
wide state: default
Wide content with generous inline padding.
Usage
import { WyrdContainer } from "@wyrd-company/react";

<WyrdContainer maxWidth="xl" padding={5}>
  Wide content with generous inline padding.
</WyrdContainer>
02

Anatomy

The specimen is the same published React component and contract example used above. Indexed markers identify only regions the contract can ground; the typed ledger keeps parts, slots, states, and semantic token bindings distinct.

ANATOMY · LIVE SPECIMEN Container default example · contract-derived
A centered reading column for design-system guidance.
  1. Part root Structural container root.

    The responsive container boundary.

  2. Slot content Content constrained by the container.

    The example text content inside the constrained column.

Parts

  • rootStructural container root.

Slots

  • contentOptional · one-or-many

States

  • defaultContent is centered with tokenized max width and inline padding.

Tokens

Not declared by this component contract.

FIG. 1 parts: root TOL. ±0

03

Properties

NameTypeDefaultSummary
max-width sm | md | lg | xl lg Maximum inline size selected from the normative Layout DSL max-width scale.
padding integer 2 Inline padding as a normative Layout DSL spacing-scale index.
04

Slots & events

SlotCardinalityAcceptsSummary
content one-or-many component Content constrained by the container.
05

States

StateSourceSummary
default platform Content is centered with tokenized max width and inline padding.
06

Accessibility

From the contract's accessibility obligations. Role none

  • Does not add landmark, section, or interactive semantics.
  • Preserves the semantics and document order of slotted content.
  • Verified under: rtl, density-compact, text-expansion, safe-area.
07

SDUI

Status: serializable. Container lowers to the Layout DSL Container node (maxWidth + padding) during Puck-to-SDUI normalisation.

SerializableMembers
Propertiesmax-width, padding
Slotscontent
Events
The Wyrding Way — a contract-first design system. © Wyrd Company