Luke UI
GitHub repository

Container

Constrain content and establish a local size container.

Container fills its available inline size up to maxInlineSize and centres itself. Pass a ct value for a fixed maximum, or a CSS length. Pass marginInline to change the centring. Read Layout to choose a layout component.

Container: Basic
Loading Container: Basic example

Responsive descendants

A traditional container usually only constrains and centres content. Luke UI's Container also establishes a local responsive query boundary.

Luke UI responsive values inside the Container resolve against its content box rather than the document root. A ct672 Container therefore never reaches bp768. paddingInline reduces the content-box width, so it can also change where responsive styles switch.

Use Container when descendants should respond to the available content area rather than the document root.

Choose the rendered element

Container uses Box's elementType and render contract.

Container: Main
Loading Container: Main example

API

ContainerProps also accepts compatible DOM and ARIA attributes and event handlers for its rendered element.

Prop

Type