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.
Site search component powered by Pagefind for fast, client-side full-text search.
The <site-search> component provides a modal search interface with keyboard shortcuts, result highlighting, and keyboard navigation. It uses Pagefind for indexing and searching your static site content.
<site-search> <button data-trigger> <icon-wc name="search"></icon-wc> Search </button></site-search>
The search component supports the following keyboard shortcuts:
| Shortcut | Action |
|---|---|
| Cmd + K / Ctrl + K | Open/close search |
| Escape | Close search |
| Arrow Up / Arrow Down | Navigate results |
| Enter | Go to selected result |
<site-search> <button data-trigger>Search</button></site-search>
<site-search> <button data-trigger aria-label="Search"> <icon-wc name="search"></icon-wc> </button></site-search>
<site-search> <button data-trigger class="ghost"> <icon-wc name="search" size="sm"></icon-wc> Search <kbd>Cmd+K</kbd> </button></site-search>
| Attribute | Values | Default | Description |
|---|---|---|---|
open (reflected) | boolean | — | Reflected state — set by open()/close() methods, not intended as initial markup |
| Element | Required | Description |
|---|---|---|
<button data-trigger> | yes | Button that opens the search dialog |
| Attribute | On | Values | Description |
|---|---|---|---|
data-trigger | button | boolean | Marks the button that opens the search dialog. Falls back to first <button> if absent. |
| Event | Detail | Description |
|---|---|---|
site-search:open | — | Fired when the search dialog opens |
site-search:close | — | Fired when the search dialog closes |
The search component requires Pagefind to index your site content. Follow these steps to set up Pagefind:
npm install --save-dev pagefind
Add a script to run Pagefind after your site builds:
{ "scripts": { "build": "vite build && npm run search:index", "search:index": "pagefind --site dist" }}
Add data-pagefind-body to your main content areas to index them:
<main data-pagefind-body> <!-- Your content here --></main>
Navigation and chrome are automatically excluded. You can also explicitly exclude elements:
<aside data-pagefind-ignore> <!-- This won't be indexed --></aside>
Create a pagefind.yml for advanced configuration:
site: distoutput_subdir: pagefind exclude_selectors: - "header" - "footer" - "nav"
role="dialog" for the search modalrole="listbox" and role="option"