Skip to main content
Named anchor for internal document links.
<Bookmark name="introduction">
  <H1>Introduction</H1>
</Bookmark>

Props

PropTypeDescription
namestringUnique bookmark identifier
childrenReactNodeContent to bookmark

Usage

Create a bookmark target:
<Bookmark name="section-1">
  <H1>Section 1</H1>
</Bookmark>
Link to it:
<Paragraph>
  See <Link href="#section-1">Section 1</Link> for details.
</Paragraph>

Common patterns

Table of contents with bookmarks

{/* Links */}
<Paragraph>
  <Link href="#intro">1. Introduction</Link>
</Paragraph>
<Paragraph>
  <Link href="#methods">2. Methods</Link>
</Paragraph>
<Paragraph>
  <Link href="#results">3. Results</Link>
</Paragraph>

<Hr />

{/* Bookmarked sections */}
<Bookmark name="intro">
  <H1>1. Introduction</H1>
</Bookmark>
<Paragraph>...</Paragraph>

<Bookmark name="methods">
  <H1>2. Methods</H1>
</Bookmark>
<Paragraph>...</Paragraph>

<Bookmark name="results">
  <H1>3. Results</H1>
</Bookmark>
<Paragraph>...</Paragraph>

Cross-references

<Paragraph>
  As shown in <Link href="#figure-1">Figure 1</Link>, the data indicates...
</Paragraph>

{/* Later in document */}
<Bookmark name="figure-1">
  <Paragraph className="font-bold">Figure 1: Sales Data</Paragraph>
</Bookmark>
<Image src="./chart.png" width="6in" />

Bookmark on paragraph

<Bookmark name="important-note">
  <Paragraph className="bg-yellow-100 p-2">
    This is an important note that can be linked to.
  </Paragraph>
</Bookmark>

Naming conventions

Bookmark names should be:
  • Unique within the document
  • URL-safe (letters, numbers, hyphens)
  • Descriptive
// Good
<Bookmark name="executive-summary">
<Bookmark name="chapter-1">
<Bookmark name="appendix-a">

// Avoid
<Bookmark name="section 1">  // spaces
<Bookmark name="a">          // not descriptive

Bookmark vs TableOfContents

FeatureBookmark + LinkTableOfContents
Manual controlYesNo
Auto-generatedNoYes
Works with headingsYesYes (automatic)
Custom targetsYesNo
Use Bookmark for custom navigation. Use TableOfContents for automatic heading-based navigation.