Skip to content

container

Holds other elements and carries the layout that arranges them.

Path

component-api:anatomy.<element>.type: container

Styles

Written on the element, not this anatomy entry — under a variant, slot content, or a composition. The style keys an element of this type may carry:

aspectRatio · backgroundColor · backgroundImage · bottom · centerHorizontalOffset · centerVerticalOffset · clipsContent · cornerRadius · cornerSmoothing · crossAxisAlignment · effects · end · gridColumns · gridRows · height · itemReverseZIndex · itemSpacing · layoutMode · layoutSizingHorizontal · layoutSizingVertical · locked · mainAxisAlignment · maxHeight · maxWidth · minHeight · minWidth · opacity · padding · position · primaryAxisSizingMode · rotation · start · strokeAlign · strokeDashPattern · strokeWeight · strokes · top · visible · width · wrap · wrapAlignment

Themes

Selected on the element, not this anatomy entry. Any element may select a theme for a token group, or inherit one from the nearest ancestor — deciding what its subtree’s token references resolve to.

Platform bindings

Figma

Disposition: bound · Realised by: FRAME or COMPONENT node

Rules: typeDetection — with text, glyph, vector, line, ellipse, rectangle, polygon, star · wrapperCollapse — with text, glyph

The default classification: any node type without a mapping of its own. The transforms’ internal key tables speak frame and component where the contract says container — the component ROOT is the component, not an anatomy element, and a nested frame folds to container. That vocabulary mapping is declared here and nowhere else.

CSS

Disposition: bound · Realised by: Css

Rules: elementSelectors — with text, glyph, vector, slot, instance, line, ellipse, rectangle

Where the layout rules realize — auto-layout, sizing, positioning all emit into container rule blocks.

React

Disposition: bound · Realised by: a div — or the tag its role decides

Rules: layoutWalk — with text, glyph, instance, slot · semanticsAndTags — with text, instance

Carries its element class for the stylesheet and the root carries the variant data attributes. In a phrasing context the default drops to span so the emitted HTML stays valid.

Web Components

Disposition: bound · Realised by: a div in the shadow tree — or the tag its role decides

Rules: layoutWalk — with text, glyph, instance, slot · semanticsAndTags — with text

The host element is the component root (:host in the stylesheet); containers are shadow-tree structure beneath it.

Decisions

  • ADR-058 — Collapsing Wrapped Primitives

Source

FormatFile
JSON Schemapackages/schema/schema/component.schema.json
TypeScriptpackages/schema/types/Element.ts
Specification§2, §11