Skip to content
Page

Container

Centered page column with token padding.

Page title

Container centers content and applies token padding.
import { Container } from "@pelagornis/page/components";

The preview above renders this file. Copy it into src/components/ to start from it.

src/components/ContainerExample.tsx
import { Container, Stack, Text } from "@pelagornis/page/components";
export default function ContainerDemo() {
return (
<Container padding="sizeXXLarge">
<Stack gap="sizeSmall">
<Text variant="headingSm" as="h3">
Page title
</Text>
<Text variant="bodyMd">Container centers content and applies token padding.</Text>
</Stack>
</Container>
);
}

Container can be written straight in an .mdx page. Import it below the frontmatter. It renders on the server, so no client directive is needed.

src/content/docs/example.mdx
---
title: Example
---
import { Container } from "@pelagornis/page/components";
<Container padding="sizeXXLarge">
Centered content
</Container>

pageMarkdoc() registers a container tag for this component. Add the preset once in markdoc.config.mjs (see Use in Markdoc), then write the tag in any .mdoc page.

src/content/docs/example.mdoc
{% container padding="sizeXXLarge" %}
Centered content
{% /container %}

Attributes use the same names and values as the React props.

Parts of the component and the data-refineui role each one renders.

PartRole
rootcontainer