Spacer
Flexible gap that pushes siblings apart inside a row or column.
Project
Import
Section titled “Import”import { Spacer } from "@pelagornis/page/components";Example
Section titled “Example”The preview above renders this file. Copy it into src/components/ to start from it.
import { Button, Spacer, Stack, Text } from "@pelagornis/page/components";
export default function SpacerDemo() { return ( <Stack direction="row" align="center" className="w-full"> <Text variant="subtitleMd">Project</Text> <Spacer /> <Button variant="primary" size="sm"> New file </Button> </Stack> );}Use in MDX
Section titled “Use in MDX”Spacer 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 { Button, Spacer, Stack } from "@pelagornis/page/components";
<Stack direction="row"> <span>Project</span> <Spacer /> <Button size="sm">New file</Button></Stack>Use in Markdoc
Section titled “Use in Markdoc”pageMarkdoc() registers a stack tag for this component. Add the preset once in markdoc.config.mjs (see Use in Markdoc), then write the tag in any .mdoc page.
{% stack direction="row" %}Project{% spacer /%}{% button size="sm" %}New file{% /button %}{% /stack %}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 | spacer |
Reference
Section titled “Reference”- Use in MDX and Use in Markdoc for the general rules.