Skip to content

Container

Wraps a component in a centred, width-constrained block — the standard page container used throughout Mateu UIs.

new Container(myContent)
PropertyTypeDefaultDescription
contentComponentThe component to wrap
styleString""Inline CSS
cssClassesString""CSS class names
new Container(
VerticalLayout.builder()
.content(List.of(
new Text("Top"),
new Text("Bottom")
))
.build()
)

Use Container to give a page a centred, readable column layout. For edge-to-edge content (full browser width), use FullWidth instead.