ProseH2, ProseH3, ProseH4
Headings, each with a permalink anchor.
Three components, one behaviour: ProseH2, ProseH3 and ProseH4 render the
headings a page's table of contents is built from.
What they add
A permalink anchor beside the heading, visible on hover and reachable by keyboard.
The id is Content's own slug, so the anchor, the table of contents and the
in-page navigation all agree.
API
Props
| Prop | Type | Notes |
|---|---|---|
id | string | The slug Content generated for the text |
Slots
| Slot | What goes in it |
|---|---|
default | The heading text |
Notes
ProseH1 is deliberately not overridden: the page title is rendered by the page,
not by the Markdown, so a Markdown # heading inside the body would be a second
h1 on the page.
Was this page helpful?