Responsive layout utility to control width of the main content area.
import { Container } from "@uicapsule/components";
import type { ContainerProps } from "@uicapsule/components";


Container should be used as a wrapper for your main content. It provides the content with max-width for larger screens and adds horizontal paddings for mobile. You can use it to center page content horizontally or within other components e.g., centering contents of the page header.

<Placeholder />

By default, Container takes the entire width of the parent. It supports the width property, which accepts any string value so that you can use it with px, %, or any other valid CSS measurement.

<Container width="1024px">
<Placeholder />

By default, Container has horizontal padding of x4 units, but you can customize it by using the padding property. For example, if you use Container to center content inside another component that already has its padding - you can completely remove it.

<Container width="1024px" padding={0}>
Your content