Reference

Intents

Every starter intent, grouped by profile and domain: the 214 intents prongs add, prongs add errors and prongs add logs put in your registry. Each page shows the intent in use, how to tell it apart from its neighbours, and how it connects to other intents.

Profiles

UI

11 domains

What each element is for. Rendered by the components.

npx prongs add

Errors

7 domains

What went wrong, told to the caller. Returned with fail().

npx prongs add errors

Logs

5 domains

What happened, told to whoever runs the app. Recorded with log().

npx prongs add logs

How intents are named

An intent is one named purpose. Pick the domain from what the code is, then the intent from what it is for.

action

Domain

the kind of thing

delete

Meaning

what it is for

Domains belong to a profile. The UI profile renders action.delete as a destructive button; the errors profile turns record.missing into a 404.

Choosing an intent

  • 1

    Match the purpose, not the look. Pick the intent whose description says what the element or code is for.

  • 2

    Read its “not for” lines. If one matches your case, use the intent it points to.

  • 3

    Nothing fits? Add one. npx prongs add-intent, instead of working around the system.

  • 4

    Check it. npx prongs check verifies usage, and runs after every edit when hooks are installed.

See the full guide

UI

What each element is for. Rendered by the components.

Heading

heading.*

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

<Text> · 6 intents

Text

text.*

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

<Text> · 27 intents

Feedback

feedback.*

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

<Text> · 4 intents

Action

action.*

Commands, named for what they do: save, delete, share. With an href they render a link, without one a button.

<Action> · 27 intents

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

<Action> · 10 intents

Choice

choice.*

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

<Action> · 4 intents

Field

field.*

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

<Field> · 14 intents

Layout

layout.*

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

<Layout> · 80 intents

Media

media.*

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

<Media> · 5 intents

Dialog

dialog.*

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

<Dialog> · 5 intents

Popover

popover.*

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

<Popover> · 4 intents

Errors

What went wrong, told to the caller. Returned with fail().

Request

request.*

The caller’s request was wrong: unreadable, incomplete, or a value that breaks a rule. 400 or 422.

4004223 intents

Auth

auth.*

No valid credentials: nobody signed in, an expired session, a bad token or secret. 401.

4014 intents

Permission

permission.*

Valid credentials, but not allowed to do this. 403.

4031 intent

Record

record.*

The thing asked for is not there, as far as the caller may know. 404.

4041 intent

Conflict

conflict.*

The request clashes with the current state: it already exists, or it is not possible yet. 409.

4092 intents

Limit

limit.*

Too many requests, or an allowance used up. 429.

4291 intent

Failure

failure.*

Our fault or a dependency’s. The caller sees a generic message; the details are logged. 5xx.

5005025033 intents

Logs

What happened, told to whoever runs the app. Recorded with log().

Audit

audit.*

Who did what, kept as a record: things created, changed, deleted, and changes to access.

info5 intents

Security

security.*

Signals worth watching: failed sign-ins, bad tokens, rate limits, probing.

warn3 intents

Incident

incident.*

Something broke or degraded, and someone should look.

errorwarn2 intents

Job

job.*

Background work: syncs, backups, migrations, scheduled runs.

info2 intents

Debug

debug.*

Detail for working on the code, dropped in production.

debug1 intent