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.
Interactive site keyword index with A-Z jump nav, search filtering, entry counts, display limits, sort options, and optional JSON data loading.
The <site-index> component enhances a static keyword index with A-Z jump navigation, search filtering with scope control, entry counts, display limits with expand/collapse, and sort options.
Without JavaScript, the static markup is a fully functional keyword index with CSS multi-column layout at wider viewports.
<site-index letters="all" limit="5"> <nav aria-label="Site index"> <section id="index-a"> <h2>A</h2> <ul> <li> <span class="index-term">accessibility</span> <ul class="index-refs"> <li><a href="/docs/accessibility">Guide</a></li> <li><a href="/docs/elements/native/input#aria"> Input ARIA</a></li> </ul> </li> <li> <span class="index-term">attributes</span> <ul class="index-refs"> <li><a href="/docs/attributes/">Reference</a></li> <li><a href="/docs/attributes/data-trust/"> data-trust</a></li> </ul> </li> </ul> </section> </nav></site-index>
| Attribute | Type | Default | Description |
|---|---|---|---|
placeholder |
string | "Filter index…" |
Placeholder text for the search input |
letters |
string | "entries" |
Jump nav mode: "entries" (only letters with entries), "all" (full A-Z strip, empty letters disabled), or "none" (hidden). |
filter |
string | — | Search scope filter mode |
sort |
string | — | Sort order for letter sections |
limit |
number | — | Max topics per letter section before a "Show N more" toggle appears. |
src |
string | — | URL to load index data from as JSON |
By default, the jump nav shows only letters that have entries. Set letters="all" to show all 26 letters with disabled states for empty ones. Scroll-spy highlights the current letter as the user scrolls.
<site-index letters="all"> <!-- Full A-Z strip; letters without entries are disabled --></site-index>
The controls bar includes a scope dropdown:
.index-term).index-refs a)For example, searching "button" in "All" mode will find topics that have a "Button element" sub-entry even if "button" isn't in the topic name.
The component automatically appends reference counts: (N) after each topic term and in each letter heading. This helps users see at a glance which topics have the most content.
When limit is set, letter sections with more topics than the limit show a "Show N more" toggle button. Clicking expands to show all entries; clicking again collapses back.
<site-index limit="3"> <!-- Sections with more than 3 topics show a "Show N more" button --></site-index>
The controls bar includes a sort dropdown:
The static markup uses semantic HTML with specific classes that the component recognizes.
<nav aria-label="Site index"> <section id="index-a"> <h2>A</h2> <ul> <li> <span class="index-term">accessibility</span> <ul class="index-refs"> <li><a href="/docs/accessibility">Guide</a></li> <li> <a href="/blog/a11y">A11y tips</a> <small>blog</small> </li> </ul> </li> </ul> </section></nav>
| Class / Element | Purpose |
|---|---|
.index-term |
Topic heading text within a <span> |
.index-refs |
Nested <ul> of page reference links |
<small> |
Optional content-type pill (e.g., "blog", "tutorial") |
id="index-X" |
Section ID for jump nav anchors (lowercase letter) |
When src is set, the component fetches index data and renders dynamically. Static markup serves as fallback.
<site-index src="/api/site-index.json" placeholder="Search index..." letters="all"></site-index>
[ { "term": "accessibility", "refs": [ { "label": "Guide", "href": "/docs/accessibility/" }, { "label": "Input ARIA", "href": "/docs/elements/native/input/" } ] }, { "term": "attributes", "refs": [ { "label": "Reference", "href": "/docs/attributes/" }, { "label": "data-trust", "href": "/docs/attributes/data-trust/", "type": "attribute" } ] }]
aria-label="Jump to letter"; disabled letters have aria-disabled="true"aria-current="true" on the active letter linkaria-label attributesaria-expandedhidden to remove from the accessibility tree<glossary-index> — Glossary with search and scroll-spy<time-index> — Changelog/timeline index<site-map> — Interactive HTML sitemap