Every feature, running on this page

Each section says what one feature does and then runs it here. The islands hydrate, the search box searches, and the embed waits for your consent. The only JavaScript on this page belongs to the islands it demonstrates.

Islands and hydration

A component marked "use client" is rendered to HTML at build time and then hydrated in the browser. Its registry row says when: load hydrates as soon as the page's script runs, idle waits until the browser has nothing else to do, and visible waits until the component scrolls into view.

Each box shows when it hydrated, counted from the moment the page opened. The last box is the same component without "use client". It gets no island marker and no script, so its text never changes.

Fold strategy: how hydration modes are tuned

load

Server HTML. Not hydrated yet.

idle

Server HTML. Not hydrated yet.

visible

Server HTML. Not hydrated yet.

static

Server HTML. It ships no JavaScript, so it never hydrates.

Responsive images

imageAttributes turns one source into a srcset, a sizes value and loading hints, through the site's own URL template. The browser picks the candidate.

Each file below has its width drawn on it, so the picture shows which one your browser chose. Widen or narrow the window and reload to see it choose another.

Images

A drafting grid with the chosen candidate's width drawn on it in large type
srcset
/images/features/stack-320.webp, /images/features/stack-640.webp, /images/features/stack-1280.webp
widths
320w, 640w, 1280w
formats
webp
sizes
(min-width: 60rem) 36rem, calc(100vw - 2rem)
loading
lazy

Subset fonts

build.fonts hands each declared face to a subsetting adapter and writes its @font-face rule, with a metric-adjusted fallback so the swap does not move the text.

This site's own type is system fonts, so this face is loaded for the specimen and nothing else. It is scoped to this page with pages, so this page links its stylesheet and preloads it, and the other pages here do neither.

Fonts

Fira Sans, cut down to printable ASCII: 0123456789 and every letter from A to z. A page that sets no text in this face never downloads it.

face
Fira Sans 400
unicode-range
U+0020-007E
fallback
Helvetica, Arial, size-adjusted

Social cards

build.socialImages draws a card for a page at build time, and the page's <head> names it as og:image, with the width and height the renderer measured. This page has one; the other pages of this site do not.

The build draws cards before it renders pages, so a component can show its own page's card. The image below is this page's card, read with useSocialCard: the same file the og:image tag names.

Page head: cards the build draws

This page's social card: the word Pagedeck above the headline "Every feature, running on this page"
og:image
/social/en-features.4d83e798.png
size
1200 x 630

Locales

This site publishes one locale. pagedeck can publish several from one build, and each version of a page then carries a canonical link and hreflang links to the others.

Canonicals and hreflang