Props
| Prop | Type | Description |
|---|---|---|
name | string | Unique bookmark identifier |
children | ReactNode | Content to bookmark |
Usage
Create a bookmark target: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
| Feature | Bookmark + Link | TableOfContents |
|---|---|---|
| Manual control | Yes | No |
| Auto-generated | No | Yes |
| Works with headings | Yes | Yes (automatic) |
| Custom targets | Yes | No |
Bookmark for custom navigation. Use TableOfContents for automatic heading-based navigation.