A heading that links to itself, so a reader can copy a link to the section. The heading text is the link, with a # before it. Where the pointer can hover and the page is at least 70rem wide, the # hangs in the margin and shows while the heading is hovered or has focus. Elsewhere it stays in line: there is no hover to reveal it, or no room in the margin for it. The default slot is the heading text. headingAnchors in @allons-y/webc-patterns/markdown writes this component for Markdown headings. The # takes --norn-text-muted.
<norn-heading-anchor>
a component, from
@allons-y/webc-patterns
<norn-heading-anchor @slug="install">Install</norn-heading-anchor>
<p>Install the package from npm.</p>
<norn-heading-anchor @slug="with-npm" :@level="3">With npm</norn-heading-anchor>
<p>Run the install command in the project folder.</p>
Copy {name} to clipboardCopyCopiedCopy failedhtml code