Container
Centered page column with token padding.
Page title
Container centers content and applies token padding.Import
Section titled “Import”import { Container } from "@pelagornis/page/components";Example
Section titled “Example”The preview above renders this file. Copy it into src/components/ to start from it.
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> );}Use in MDX
Section titled “Use in MDX”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.
---title: Example---
import { Container } from "@pelagornis/page/components";
<Container padding="sizeXXLarge"> Centered content</Container>Use in Markdoc
Section titled “Use in Markdoc”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.
{% container padding="sizeXXLarge" %}Centered content{% /container %}Attributes use the same names and values as the React props.
Anatomy
Section titled “Anatomy”Parts of the component and the data-refineui role each one renders.
| Part | Role |
|---|---|
root | container |
Reference
Section titled “Reference”- RefineUI · Container for design guidance and token detail.
- Use in MDX and Use in Markdoc for the general rules.