Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
Adds clickable anchor links to headings with auto-generated IDs and click-to-copy URL support.
Wraps a content area and adds anchor link icons to headings. Hover a heading to reveal the link icon; click it to scroll, update the URL hash, and copy the link to clipboard.
Wrap any content containing headings. By default, h2 and h3 elements are processed.
<heading-links> <h2>Getting Started</h2> <p>Content here...</p> <h3>Installation</h3> <p>More content...</p></heading-links>
| Attribute | Values | Default | Description |
|---|---|---|---|
levels | Comma-separated heading selectors | h2,h3 | Which heading levels to process |
<!-- Only process h2 headings --><heading-links levels="h2"> <h2>This gets an anchor</h2> <h3>This does not</h3></heading-links> <!-- Process h2, h3, and h4 --><heading-links levels="h2,h3,h4"> <h2>Anchor link</h2> <h3>Anchor link</h3> <h4>Anchor link</h4></heading-links>
Headings without an id attribute get one generated from their text content. Existing IDs are preserved. Generated IDs are limited to 50 characters and de-duplicated automatically.
<!-- Existing IDs are preserved --><heading-links> <h2 id="custom-id">This keeps its ID</h2> <h3>This gets an auto-generated ID</h3></heading-links>
| Event | Detail | Description |
|---|---|---|
heading-links:navigate | { id: string, url: string } | Fired when an anchor link is clicked |
const el = document.querySelector('heading-links'); el.addEventListener('heading-links:navigate', (e) => { console.log('Navigated to:', e.detail.id); console.log('URL:', e.detail.url);});
<dialog> elements are skippedMutationObserver watches for dynamically added headingsaria-label="Link to [heading text]"tabindex="-1" for keyboard navigation to anchored sectionsrole="status" with aria-live="polite"The anchor uses the .heading-anchor class. It is hidden by default (opacity: 0) and revealed on hover/focus.
/* Custom anchor icon color */heading-links .heading-anchor { color: var(--color-primary);} /* Always show anchors (instead of hover-only) */heading-links .heading-anchor { opacity: 1;}
<page-toc> — Table of contents generator (pairs well with heading-links)data-copy — Click-to-copy attribute