Anchor
Headings with anchor links
Headings that show a copy link icon on hover.
Usage
Or use the heading shortcuts:
Features
- Hover to reveal link icon
- Click to copy anchor URL
- Works with TOC scroll spy
- All heading levels (h1-h6)
Components
| component | element |
|---|---|
| Anchor | Custom level via as prop |
| H1 | h1 |
| H2 | h2 |
| H3 | h3 |
| H4 | h4 |
| H5 | h5 |
| H6 | h6 |
Props
| prop | type | default | description |
|---|---|---|---|
| id | string | required | Anchor ID for linking |
| children | ReactNode | required | Heading text |
| as | string | "h2" | HTML element (Anchor only) |