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.
Standalone pagination controls element targeting any [data-paged] container. The element form of the data-paged primitive. Mirrors VB's layout-* / data-layout-* element-attribute symmetry — pick the surface that fits the markup.
The <pager-wc> element is the element form of the data-paged primitive. Same engine, different surface. Authors choose:
data-paged on the container; controls render in place as siblings of the items.<pager-wc target="#id"> anywhere on the page; controls live wherever you put the element.This mirrors the framework-wide pattern: <layout-grid> + data-layout-min, <layout-stack> + data-gap, etc. Element-and-attribute symmetry covers all the cases — pick the one that fits the markup you already have.
Use the element form when the items and the controls live in different parts of the layout:
For the common in-place case (controls right after the items), use data-paged directly — no extra element required.
| Attribute | Type | Default | Description |
|---|---|---|---|
target |
string (CSS selector) | — | Preferred. CSS selector for the [data-paged] container. |
for |
string (id) | — | HTML-form-style alternative to target: the bare ID of the target. |
style |
enum: numbered · prev-next · load-more |
numbered |
Control style. infinite is intentionally unsupported — an IntersectionObserver sentinel doesn't make sense for decoupled controls. |
Implicit target: if neither target nor for is set, <pager-wc> binds to the nearest preceding [data-paged] sibling. Useful for the common "items above, pager below" pattern with zero wiring.
| Event | Detail | Notes |
|---|---|---|
pager-wc:navigate |
{ page } |
Bubbles before the target processes the navigation. Use for analytics, scroll-restore, or transition hooks. |
The target's own paged:change event fires from the data-paged engine after the slice updates — listen on the target itself for "after navigation" hooks.
Two or more <pager-wc> elements pointing at the same target stay in sync automatically — each subscribes to the target's paged:change event and re-renders. No additional wiring needed.
<pager-wc target="#feed"></pager-wc> <ul id="feed" data-paged data-paged-size="10" data-paged-controls="none"> <li>...</li></ul> <pager-wc target="#feed"></pager-wc>
<nav aria-label="Pagination"> markup as data-paged — native <button>s, aria-current="page", ellipsis with aria-hidden."No paginated target found") instead of failing silently.The decoupled-control story is wired through three custom events on the target:
paged:change — fired by the engine after each render. <pager-wc> listens and re-renders its own controls.paged:goto { page } — fired by <pager-wc> button clicks. The engine listens and navigates.paged:loadmore — fired for the load-more button. Same pattern.Any consumer can dispatch paged:goto on a [data-paged] container to drive navigation — <pager-wc> is just one possible source.