Skip to main content
Named anchor for internal document links.

Props

PropTypeDescription
namestringUnique bookmark identifier
childrenReactNodeContent to bookmark

Usage

Create a bookmark target:
Link to it:

Common patterns

Table of contents with bookmarks

Cross-references

Bookmark on paragraph


Naming conventions

Bookmark names should be:
  • Unique within the document
  • URL-safe (letters, numbers, hyphens)
  • 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.