0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
Configurable toolbar for page-level utilities — print, share, stats — with responsive FAB collapse.
Overview
The <page-tools> component aggregates page-level utilities into a cohesive toolbar. It handles positioning and responsive collapse so individual tools do not need to solve these problems independently.
Any direct child element is treated as a tool — no registry needed. On small viewports, the toolbar collapses into a floating action button (FAB) that opens a native popover panel.
Tool strip direction: auto, vertical, horizontal. Auto resolves to vertical for sticky/fixed, horizontal for inline. The resolved value is reflected as data-resolved-orientation and aria-orientation, and re-resolves when data-orientation or data-position changes.
data-gap
string
s
Gap between tools: 2xs, xs, s, m, l
data-fab-icon
string
ellipsis-vertical
Icon name for the mobile FAB button
data-fab-label
string
Page tools
Accessible label for the FAB button
data-breakpoint
string
48rem
Viewport width at or below which the toolbar collapses to FAB
At or below the breakpoint (default 48rem), the toolbar collapses into a floating action button pinned to the bottom inline-end corner. The tools stay hidden until the FAB is activated; it then opens a native popover panel just above it containing the tools. Tools are DOM-moved (not cloned) so event listeners are preserved.
If the page has a <fab-stack>, the FAB joins it as its last child instead of taking the corner for itself, so it stacks with the page's other floating buttons (settings, back to top) rather than sitting on top of them, at their size and with their look. The panel then opens just above the FAB wherever the stack puts it. The FAB returns to <page-tools> when the toolbar expands or is removed.
Custom Tools
Any element works as a tool. Slot in standard VB components, plain links, or custom elements:
The highlights system ships an action component that fits naturally into <page-tools> as a page-level shortcut. Drop a <note-wc for="article-id"> into the rail and clicking it opens the note panel for the first highlight on that article.
Use the icon variants of the built-in tools (share-wc variant="icon", text-reader variant="icon") so they pick up the toolbar’s button normalisation.
For the inline selection toolbar (highlight + note on demand), use <selection-menu> alongside the article. Both surfaces talk to the same engine and storage.
Progressive Enhancement
Without JavaScript, <page-tools> is styled as a flex container by CSS alone. Children remain visible and functional. The FAB collapse and toolbar semantics are added only when the component upgrades.
Accessibility
The component sets role="toolbar" and aria-label="Page tools" on upgrade (authored values are kept), plus aria-orientation from the resolved direction. While collapsed, the element holds only the floating button and the popover, so the role and aria-orientation it set move to the popover panel, which becomes the role="toolbar" (named with the same label, aria-orientation="vertical"); both return to the element when the toolbar expands. An authored role is left in place, and the panel then takes no role.
It follows the toolbar keyboard pattern: the tools form a single Tab stop (roving tabindex); ←/→ (horizontal, mirrored in RTL) or ↑/↓ (vertical) move between tools and wrap; Home/End jump to the first/last tool. Text inputs and selects keep their own arrow keys.
The FAB is a native button with an accessible label (data-fab-label) and controls the popover via popovertarget; the panel is named with the same label.
The popover light-dismisses on Escape or a click outside. Focus returns to the FAB only when focus was inside the panel as it closed (for example Escape from a tool); a click elsewhere keeps focus where you clicked.
While collapsed and closed, the panel is display: none, so its tools are neither visible nor focusable.