Components / Layout and type
Container
Centered page column with a 16px gutter on phones.
import { Container } from "@stylhero/ui";
Example
Code
import { Container, Paper } from "@stylhero/ui";
function ContainerExample() {
return (
<Container size="sm">
<Paper padding={4} tone="sunken">A centered column, at most the `sm` width, with page gutters.</Paper>
</Container>
);
}
Props
| Prop | Type | Default | Description |
|---|---|---|---|
as |
ElementType |
"div" |
|
size |
"sm" | "md" | "lg" | "xl" |
"lg" |
Max width: sm 640, md 768, lg 1024, xl 1280. |
Also takes the HTML attributes of its root element (id, style, data-*, aria-*, event handlers…).
Generated from src/components/Container.tsx. Something wrong or missing? Open an issue.