Containers are used to constrain a content's width to the current breakpoint, while keeping it fluid.
By default, it sets the max-width
of the content to 60 characters (60ch
) but
you can customize this by passing custom maxWidth
values or changing the
container size tokens defined in theme.sizes.container
.
To contain any piece of content, wrap it in the Container
component.
In some cases, the width of the content can be smaller than the container's
width, you can use the centerContent
prop to center the content.
Container composes Box
so you can pass all Box
related props in addition to
this.
Name | Type | Description | Default |
---|---|---|---|
centerContent | boolean | If `true`, container will center its children regardless of their width. | - |
colorScheme | string | - | |
orientation | "horizontal" | "vertical" | - | |
size | string | - | |
styleConfig | Record<string, any> | - | |
variant | string | - |