prongs
GitHub

Layout

Page regions and groups. The intent picks the element (main, section, form, ul…) and the arrangement.

Pattern

layout.*

Component

Intents

In packs

Intents

A centred column of content. An app page has one; a marketing page may have one per full-width band

A page for one short task or one message, centred on the screen: sign in, reset password, a confirmation, not found, a link that has expired. Its headings, text and actions are centred; a form or section inside takes the full width

The bar at the top of the site or app: the product name, its navigation and account controls

The frame of an app with a sidebar: one layout.aside beside the main column. Used once, around the signed-in part of the app

Content beside the main column: a docs sidebar, filters, a table of contents

The site footer at the bottom of every page

A part of a page made of separate blocks, with or without a title: a section under its heading, the cards in a column, a panel’s contents

A whole screen with its own background, like a maintenance, sign-in or error page. It takes the page colours, so the page is not the app’s background

A plain box with no look that positions what sits inside it: the anchor for a badge or a menu placed over an element

A few closely related elements kept together, e.g. a heading and its text

Content at the start of a line and its controls at the end: a section’s title and its button, a panel’s title bar, a list entry with its actions. The controls drop below when the line runs out of room

The heading and short text that introduce a section, above its content: a section title and its lead, a block of cards’ introduction

Two parts of one section side by side that stack on phones: an image beside its text, a form beside a preview. data-reverse puts the second part first on wider screens

An icon, avatar or logo beside its text: a person’s photo and name, an icon and its label. The text shrinks and wraps; the icon keeps its size

A form: renders <form> and stacks its fields

One form field: its label, input, help text and error

Commands side by side: a form’s buttons, a dialog’s choices

Controls that act on the content below them: filters, views, refresh

Label and value pairs about one thing: an order’s totals, a booking’s What / When / Who, a record’s details. Renders <dl>; each pair is a <div> with a text.label as="dt" and its value as="dd"

Records with the same fields, compared across: members, invoices, API keys. Write plain thead, tbody, tr, th scope="col" and td inside, with no classes; data-off on a tr marks a row that is switched off. Use data-head="bar" when the table runs edge to edge in a panel with no padding. With more columns than fit on a phone, wrap it in a layout.scroller

Content wider than its column, which the reader scrolls sideways: a table with many columns, a long line of code, a board. Give it tabIndex={0} and an aria-label, so keyboard users can scroll it too

The row of nav.paging links below a long list or table. Give it aria-label="Pagination"

layout.dock<footer>

A bar that stays at the bottom of the screen while the content under it scrolls or changes: the now-playing bar, a cart total, a long form’s submit button on phones

A list of items of the same kind: articles, people, notifications. Children are layout.item

One entry in a layout.list

A self-contained box about one thing: a sign-in box, a profile summary

Equal items shown side by side as a grid: people to follow, featured sources. It fits as many columns as its own width allows, so it works in a sidebar as well as across a page; set columns from a breakpoint only when the count matters

A message about the page or the account: check your email, password updated, your trial ends soon. Add an action.dismiss when it can be dismissed

A short message that appears over the page and leaves on its own, sometimes with one action: saved, could not send, undo. Holds one feedback.* line and at most one action

What a region shows when it has nothing yet: an icon, a heading, a sentence and the first action

Stands in for content that is still loading: a full-width line of text unless you give it the shape of what will appear

A break between two parts of the same content: groups in a menu, sections of a panel. Runs across whichever way its parent flows

Content that opens and closes in place under a text.summary line: an FAQ answer, advanced settings

From the SaaS pack

Apps people work in: records in tables, settings pages, plans and billing. Add it with npx prongs add saas.

A page with its own section nav beside its content: settings, account, a project’s admin. Put the nav first (a nav of nav.page links), then the content. On phones the nav sits above it

From the Editorial pack

Things people read: articles, posts, docs, news and their previews. Add it with npx prongs add editorial.

A reading column for a whole page: articles, documents, settings

A box in a layout.collection that previews one page and opens it as a whole: its nav.item title covers the box

From the Marketing pack

Landing and product pages: the headline and the links that lead on. Add it with npx prongs add marketing.

layout.band<section>

A full-width part of a marketing page with its content centred: a hero, a row of features, a call to action. Put a layout.page inside for the content width

From the Dashboard pack

Numbers to watch: amounts in a range, charts, devices and their status. Add it with npx prongs add dashboard.

layout.chart<figure>

A chart: a trend over time, a breakdown. Renders <figure>; put the chart's svg or canvas inside with a height, and a text.caption that says what it shows

An amount shown as a row of blocks, like a battery: the more blocks filled, the more of it. Each block is a layout.blocks.cell, with data-on on the filled ones; data-tone="success", "warning" or "danger" on the row colours them by level. Give it aria-valuenow, aria-valuemin and aria-valuemax

One block of a layout.blocks; data-on when it is filled

An icon or avatar with a status dot on its corner: a device and whether it is online. Put the icon first and a text.indicator last

From the Media pack

Photos, video and music: galleries, players and full-size views. Add it with npx prongs add media.

Controls placed over a photo or video, like the arrows in a dialog.media, kept readable on any image

Choosing a domain

Find the row that describes your case, and use the domain on the right.

  • If the problem is

    Use

  • Titles that give a page its structure, from the marketing headline down to the title of one item.

    heading.*
  • Running text and the small pieces around it: introductions, captions, labels, facts about an item, code.

    text.*
  • Messages about what just happened or is happening. They are announced to screen readers.

    feedback.*
  • What pressing it does: finish a form, start something, run a command, delete. The verb itself goes in the verb prop. With an href they render a link, without one a button.

    action.*
  • Moving around: the home link, pages of the site, views of the same content, steps of a flow.

    nav.*
  • Picking from a small set shown all at once: options for a setting, filters, colours.

    choice.*
  • What the user types or picks in a form. The intent sets the element, the input type, the input mode and autocomplete.

    field.*
  • Page regions and groups. The intent picks the element (main, section, form, ul…) and the arrangement.

    layout.*
  • Images that identify a person or illustrate content, with a text fallback when there is no image.

    media.*
  • Modal interruptions built on the native <dialog>: a task, a confirmation, a full-screen reader.

    dialog.*
  • Things that open next to the button that opened them without blocking the page: menus, pickers, extra detail.

    popover.*

For registry authors

Starter intents. These are the intents prongs add puts in your registry, shown in this site’s theme. Yours are your own registry.ts: rename, restyle and add to them, and see them with prongs add gallery.