Docs menu
Reference
Utilities
Helpers for your own components and layouts.
All from notionic.
The page's headings in reading order, with the same anchor ids the rendered headings get. Use it for a sidebar outline:
TypeScript
const outline = collectHeadings(blocks)// [{ id: "install", text: "Install", level: 1, blockId: "…" }]Renders a Notion rich text array, with annotations, colors and links: <RichText text={block.callout.rich_text} context={context} />.
The text of a rich text array without formatting, and a page's title from its properties.
How a link renders, after pageHref and safety checks: { href, external }, or null.
The built-in component for each block type.