Skip to content
Page

Divider

Horizontal rule between groups, with an optional inline label.

Above the lineBelow the line
import { Divider } from "@pelagornis/page/components";

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

src/components/DividerExample.tsx
import { Divider, Stack, Text } from "@pelagornis/page/components";
export default function DividerDemo() {
return (
<Stack gap="sizeLarge" className="w-full">
<Text variant="bodyMd">Above the line</Text>
<Divider />
<Divider layout="content" align="center">
Or continue with
</Divider>
<Text variant="bodyMd">Below the line</Text>
</Stack>
);
}

Divider 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 { Divider } from "@pelagornis/page/components";
<Divider />
<Divider layout="content" align="center">Or continue with</Divider>

pageMarkdoc() registers a divider 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
{% divider /%}
{% divider layout="content" align="center" %}Or continue with{% /divider %}

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

Values the component accepts for each variant prop.

PropValues
layoutdefault content icon

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

PartRole
rootdivider