AnchorLinks
The <AnchorLinks>
and <AnchorLink>
components are used together to display a list of anchor links for navigation within the page. Use these to link to <h2>
or <h3>
anywhere within your page. As long as the anchor link text and header text matches the link will work.
For most pages, we recommend starting with a PageDescription
followed by AnchorLinks
if the content is long enough.
Example
NormalSmallCode
NormalSmall
Props
AnchorLinksproperty | propType | required | default | description |
---|---|---|---|---|
children | node | |||
small | bool | Display small font size |
property | propType | required | default | description |
---|---|---|---|---|
children | node | |||
to | string | props.children | By default, the AnchorLink slugifys the children you pass in. Use the to prop to override this target. |