@nadicodeai/ui 12.1.197 → 12.1.198
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +7 -1
- package/dist/components/action-menu.d.ts +1 -1
- package/dist/components/action-menu.js +1 -1
- package/dist/components/activity-calendar.d.ts +2 -2
- package/dist/components/activity-calendar.js +2 -2
- package/dist/components/card.d.ts +2 -2
- package/dist/components/card.js +2 -2
- package/dist/components/clearable-input.d.ts +3 -2
- package/dist/components/clearable-input.d.ts.map +1 -1
- package/dist/components/clearable-input.js +3 -2
- package/dist/components/collection-page.d.ts +1 -1
- package/dist/components/collection-page.js +1 -1
- package/dist/components/collection-sort.d.ts +2 -2
- package/dist/components/collection-sort.js +2 -2
- package/dist/components/collection-toolbar.js +2 -2
- package/dist/components/command.d.ts +2 -2
- package/dist/components/command.js +2 -2
- package/dist/components/confirm-dialog.d.ts +1 -1
- package/dist/components/confirm-dialog.js +1 -1
- package/dist/components/context-menu.d.ts +1 -1
- package/dist/components/context-menu.js +1 -1
- package/dist/components/data-table.d.ts +3 -3
- package/dist/components/data-table.js +2 -2
- package/dist/components/dialog.d.ts +2 -1
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +2 -1
- package/dist/components/disclosure.d.ts +2 -2
- package/dist/components/disclosure.js +2 -2
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/empty-state.d.ts +1 -1
- package/dist/components/empty-state.js +1 -1
- package/dist/components/entry-scene.d.ts +1 -1
- package/dist/components/entry-scene.js +1 -1
- package/dist/components/form-dialog.d.ts +1 -1
- package/dist/components/form-dialog.js +1 -1
- package/dist/components/form-drawer.d.ts +1 -1
- package/dist/components/form-drawer.js +1 -1
- package/dist/components/hover-card.d.ts +2 -1
- package/dist/components/hover-card.d.ts.map +1 -1
- package/dist/components/hover-card.js +2 -1
- package/dist/components/identity-mark.d.ts +1 -1
- package/dist/components/identity-mark.js +1 -1
- package/dist/components/input.d.ts +4 -4
- package/dist/components/input.js +4 -4
- package/dist/components/middle-truncate.d.ts +3 -1
- package/dist/components/middle-truncate.d.ts.map +1 -1
- package/dist/components/middle-truncate.js +3 -1
- package/dist/components/notice-banner.d.ts +1 -1
- package/dist/components/notice-banner.js +1 -1
- package/dist/components/object-page.d.ts +3 -3
- package/dist/components/object-page.d.ts.map +1 -1
- package/dist/components/object-page.js +2 -2
- package/dist/components/page-actions.d.ts +3 -3
- package/dist/components/page-actions.js +3 -3
- package/dist/components/page-header.d.ts +16 -8
- package/dist/components/page-header.d.ts.map +1 -1
- package/dist/components/page-header.js +16 -8
- package/dist/components/popover.d.ts +4 -3
- package/dist/components/popover.d.ts.map +1 -1
- package/dist/components/popover.js +4 -3
- package/dist/components/record-identity.d.ts +1 -1
- package/dist/components/record-identity.js +1 -1
- package/dist/components/record-list.d.ts +1 -1
- package/dist/components/record-list.js +1 -1
- package/dist/components/scope-switcher.d.ts +1 -1
- package/dist/components/scope-switcher.js +1 -1
- package/dist/components/settings-facts.d.ts +1 -1
- package/dist/components/settings-facts.js +1 -1
- package/dist/components/settings-page.d.ts +1 -1
- package/dist/components/settings-page.js +1 -1
- package/dist/components/settings-section.d.ts +6 -6
- package/dist/components/settings-section.js +6 -6
- package/dist/components/sidebar-sections.d.ts +2 -2
- package/dist/components/sidebar-sections.js +2 -2
- package/dist/components/sidebar.d.ts +3 -3
- package/dist/components/sidebar.js +3 -3
- package/dist/components/status-badge.d.ts +13 -4
- package/dist/components/status-badge.d.ts.map +1 -1
- package/dist/components/status-badge.js +13 -4
- package/dist/components/table-value.d.ts +2 -2
- package/dist/components/table-value.js +2 -2
- package/dist/components/tabs.d.ts +10 -3
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +10 -3
- package/dist/components/tooltip.d.ts +3 -2
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip.js +3 -2
- package/dist/components/waiting-line.d.ts +3 -2
- package/dist/components/waiting-line.d.ts.map +1 -1
- package/dist/components/waiting-line.js +3 -2
- package/dist/internal/row-message.d.ts +1 -1
- package/dist/showcase/usage.generated.js +60 -60
- package/dist/styles/components.css +2 -2
- package/package.json +2 -2
|
@@ -65,7 +65,7 @@ export const USAGE = [
|
|
|
65
65
|
summary: "A page whose job is a list of records: its title with the page's actions on one row, its sibling collections, one toolbar, then one line per record.",
|
|
66
66
|
when: "“Use `<Entity>` for a row of descriptive content paired with one or two controls (member rows, integration rows, domain rows).” (https://vercel.com/geist/entity) Ours: a list of entity rows a person finds one of, opens and acts on: Customers, Agents, Skills, Apps, MCP servers, Mailboxes, domains, environment variables (a row with an `editor` expands into its form). Its rows are a `RecordList`'s, so a row has a mark, a name over a muted line and at most three facts; anything wider is not this page. “Projects”: Vercel's Projects page stands a column of titled cards (Usage, Alerts, Recent Previews) at the left of its list. (https://vercel.com/dashboard) Ours: Customers and Partners use the full-width list, with actionable attention above the toolbar when present. Business summaries belong on Dashboard and Analytics. A rail remains available for context that belongs to the collection itself, such as the selected Library hub.",
|
|
67
67
|
instead: "“For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity) Ours: records compared across columns, read by their headings, are a `DataTable` under the page's own title and toolbar. A list inside another page's section is a `RecordList` with its `heading`.",
|
|
68
|
-
behaviour: "Title or none, as Vercel decides it: a page that is one plain list of things a person makes, whose concept needs no sentence, such as Vercel's Domains, Storage, Projects and AI Gateway's API Keys, has no title row, and its actions (its create buttons) end its search row, after the filters. A page that needs its one sentence, or whose commands do something other than create, such as Environment Variables, Members, Integrations and Deployments, keeps its title row with the sentence and every action on it. The product says which a page is (`PageActionsHostProvider`'s `titled`, or this composition's own `title`), never what the page shows at the moment, so an issue appearing above the list never moves the actions. With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The title row holds at most one secondary, the primary, then the three dots, which open only for two commands or more. The primary stays in the title row whether the collection is empty or not, filled, as Vercel's Flags keeps Create Flag; a first use repeats it as the filled button in its card. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records, a search or filter is set, or a facet hides records while unset (`hidesWhileUnset`, as the archived companies), and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The rows, their states and their loading are the RecordList's; no match is offered only in those same cases, so records a facet hides by default are always one choice away.",
|
|
68
|
+
behaviour: "The page supplies its records and their commands as data, never its own toolbar, table, rows or menus. Title or none, as Vercel decides it: a page that is one plain list of things a person makes, whose concept needs no sentence, such as Vercel's Domains, Storage, Projects and AI Gateway's API Keys, has no title row, and its actions (its create buttons) end its search row, after the filters. A page that needs its one sentence, or whose commands do something other than create, such as Environment Variables, Members, Integrations and Deployments, keeps its title row with the sentence and every action on it. The product says which a page is (`PageActionsHostProvider`'s `titled`, or this composition's own `title`), never what the page shows at the moment, so an issue appearing above the list never moves the actions. With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The page's title names the collection once, and the records' card never adds a header that only describes it. The title row holds at most one secondary, the primary, then the three dots, which open only for two commands or more. The primary stays in the title row whether the collection is empty or not, filled, as Vercel's Flags keeps Create Flag; a first use repeats it as the filled button in its card. The page's actions stay on its title row whichever tab is shown; the toolbar belongs to the tab shown, and switching clears its search and page. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records, a search or filter is set, or a facet hides records while unset (`hidesWhileUnset`, as the archived companies), and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The rows, their states and their loading are the RecordList's; no match is offered only in those same cases, so records a facet hides by default are always one choice away.",
|
|
69
69
|
words: '“For multi-facet filters use the plural template `No {Items} Match Your Filters` and suggest widening or clearing.” (https://vercel.com/geist/empty-state) Ours: every string is the product\'s, in sentence case. The title names the collection in the plural ("Agents"); the search says what it finds ("Find a skill"); no match says what found nothing and offers to clear it ("Clear search", "Clear filters").',
|
|
70
70
|
access: "“After an async filter change, wrap the region in `aria-live=\"polite\"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state) Ours: the rows' region is the RecordList's, which holds it. The title is the page's h1 when the composition draws it. The toolbar is named by `label` and busy while `pending`; the rows are the RecordList's table, named by `label`.",
|
|
71
71
|
},
|
|
@@ -87,7 +87,7 @@ export const USAGE = [
|
|
|
87
87
|
summary: "A consequence confirmed before it happens, in a blocking alert dialog.",
|
|
88
88
|
when: '"Reach for this over `Modal` when the action is destructive and warrants friction: delete, rotate, revoke, disconnect, downgrade, disable a security setting. The typed gate forces deliberate intent." (https://vercel.com/geist/destructive-action-modal) "Use it for reversible destructive actions too, when the consequence is serious enough to warrant a pause — disabling deployment protection, revoking a shared token. Keep the typed gate; drop `irreversibleDescription`." (https://vercel.com/geist/destructive-action-modal) "For high-stakes destructive actions (delete production resource, rotate signing key, downgrade plan), gate the primary button on a typed match of the resource name." (https://vercel.com/geist/modal) Ours: `ConfirmDialog` is Geist\'s DestructiveActionModal: remove a mailbox, delete an Agent, with `verify` as the typed gate. It asks for the record\'s name before the confirm enables on a high-stakes action (delete, rotate, revoke, disconnect, downgrade, a protection switched off), even a reversible one; `irreversible` names what cannot be undone and is left out when the action can be reversed.',
|
|
89
89
|
instead: '"Don\'t use for routine confirmations (save draft, discard changes, close without saving). The typed gate reads as melodrama when the stakes are low — use a plain `Modal` instead." (https://vercel.com/geist/destructive-action-modal) "Confirm destructive actions in a Modal. `Drawer` and `Sheet` don’t fully dim the page, so they read as too soft for a delete or revoke." (https://vercel.com/geist/modal) Ours: a routine confirmation (discard a draft) takes neither `verify` nor `irreversible`; an action that can be undone runs at once and offers its undo in a toast; a form of a few fields is a `FormDialog`; a choice from a catalogue is a `CatalogDrawer`.',
|
|
90
|
-
behaviour: '"The verification input gets focus on open so the user can start typing immediately. Submit stays disabled until the value matches `verificationPhrase` exactly." (https://vercel.com/geist/destructive-action-modal) "Enter submits only when the gate is open; it\'s a no-op otherwise. Cancel, outside-click, and Escape all dismiss." (https://vercel.com/geist/destructive-action-modal) "`loading` disables both buttons. The caller owns `open` — do not self-dismiss from `onConfirm`. Close the modal after the API settles (success or error), or keep it open on error so the user can retry." (https://vercel.com/geist/destructive-action-modal) "Default focus to `Cancel` on any destructive Modal. Enter must never trigger the destructive action without a typed confirmation." (https://vercel.com/geist/modal) "Allow Escape and outside-click to dismiss non-destructive Modals; gate dismissal on destructive ones with unsaved input." (https://vercel.com/geist/modal) Ours: `title`, `description`, `confirmLabel` and `cancelLabel` are required; `irreversible` and `verify` are optional, and the absence of `irreversible` is what marks the action reversible. Geist\'s `irreversibleDescription` is `irreversible`, `verificationPhrase` and `verificationLabel` are `verify.phrase` and `verify.prompt`, and `error` is the catalogue\'s message. 480 px wide over a scrim. The title and the description, then the body in a 24 px column: the `irreversible` note, the `verify` field, the failure under it. `irreversible` is a flat red note with a red mark and red words, not a band over the footer; besides it the only red is the failure and the enabled destructive confirm. While `loading` the field turns read-only and keeps focus, Escape does not close it, and the confirm says `confirmPendingLabel`, which falls back to the confirm\'s label. A press outside does not close it, so a stray click never discards a typed phrase or an action in flight; Escape and Cancel do. The footer is a bar that stays at the bottom while a tall confirmation scrolls, and a row on a phone too. How long it stays open while work goes on follows
|
|
90
|
+
behaviour: '"The verification input gets focus on open so the user can start typing immediately. Submit stays disabled until the value matches `verificationPhrase` exactly." (https://vercel.com/geist/destructive-action-modal) "Enter submits only when the gate is open; it\'s a no-op otherwise. Cancel, outside-click, and Escape all dismiss." (https://vercel.com/geist/destructive-action-modal) "`loading` disables both buttons. The caller owns `open` — do not self-dismiss from `onConfirm`. Close the modal after the API settles (success or error), or keep it open on error so the user can retry." (https://vercel.com/geist/destructive-action-modal) "Default focus to `Cancel` on any destructive Modal. Enter must never trigger the destructive action without a typed confirmation." (https://vercel.com/geist/modal) "Allow Escape and outside-click to dismiss non-destructive Modals; gate dismissal on destructive ones with unsaved input." (https://vercel.com/geist/modal) Ours: `title`, `description`, `confirmLabel` and `cancelLabel` are required; `irreversible` and `verify` are optional, and the absence of `irreversible` is what marks the action reversible. Geist\'s `irreversibleDescription` is `irreversible`, `verificationPhrase` and `verificationLabel` are `verify.phrase` and `verify.prompt`, and `error` is the catalogue\'s message. 480 px wide over a scrim. The title and the description, then the body in a 24 px column: the `irreversible` note, the `verify` field, the failure under it. `irreversible` is a flat red note with a red mark and red words, not a band over the footer; besides it the only red is the failure and the enabled destructive confirm. While `loading` the field turns read-only and keeps focus, Escape does not close it, and the confirm says `confirmPendingLabel`, which falls back to the confirm\'s label. A press outside does not close it, so a stray click never discards a typed phrase or an action in flight; Escape and Cancel do. The footer is a bar that stays at the bottom while a tall confirmation scrolls, and a row on a phone too. How long it stays open while work goes on follows the product-design skill\'s rule/wait-shows-where-it-lives and living-elements.md "System waits".',
|
|
91
91
|
words: '"`title` is Title Case, `Verb + Noun`, a statement — never a question. `Delete Project`, not `Delete this project?`." (https://vercel.com/geist/destructive-action-modal) "`description` is sentence case, names the consequence, and interpolates the specific resource when relevant. `<b>my-project</b> and all its deployments will be permanently deleted.` reads stronger than `This project and all its deployments will be deleted.`." (https://vercel.com/geist/destructive-action-modal) "`confirmLabel` matches the title 1:1. Never generic (`Confirm`, `OK`, `Continue`), never a bare verb (`Delete`)." (https://vercel.com/geist/destructive-action-modal) "`cancelLabel` defaults to `Cancel`. Override when Cancel is ambiguous, such as `Keep Turn Running` when the primary action is itself a cancellation." (https://vercel.com/geist/destructive-action-modal) "`verificationPhrase`: for entity deletes, type the **resource name itself** (`my-project`) and pair with `verificationLabel="project name"` so the prompt reads `To confirm, type the project name "my-project"`. That\'s the canonical signal that the user knows which thing they\'re acting on. Fall back to a lowercase verb phrase (`disable vercel authentication`) only when there\'s no entity to name." (https://vercel.com/geist/destructive-action-modal) "`irreversibleDescription` names the specific action and resource and ends with `cannot be undone.` — `Deleting my-project cannot be undone.` rather than the generic `This cannot be undone.`. Omit the prop entirely for reversible actions; the prop\'s absence is the signal, not a falsy value." (https://vercel.com/geist/destructive-action-modal) "`error` surfaces the API failure verbatim in Vercel voice: `Couldn\'t save settings. Try again.`. Never dump a raw error object." (https://vercel.com/geist/destructive-action-modal) "Pair the post-confirm success toast verb 1:1 with the primary button: `Delete Project` button, `Project deleted` toast. Never `Project removed`." (https://vercel.com/geist/destructive-action-modal) "Close irreversible bodies with `This cannot be undone.`; close cascade-only bodies with `Some effects cannot be undone.`. Don’t claim full irreversibility for a partial cascade." (https://vercel.com/geist/modal) Ours: the title is sentence case and names the record, "Remove pec@acme.it", and the confirm repeats the verb and the noun, "Remove mailbox", so the two share a verb and not every word; its success toast uses the same verb ("Mailbox removed"). The description names the record in medium weight.',
|
|
92
92
|
access: '"The verification input is associated with its prompt via `aria-labelledby` + `htmlFor`. Screen readers announce the full prompt (`To confirm, type "delete my-project"`) on focus." (https://vercel.com/geist/destructive-action-modal) "The Warning icon in the irreversibility band is `aria-hidden`; the sentence carries the meaning so nothing is announced twice." (https://vercel.com/geist/destructive-action-modal) "Focus stays inside the modal across an `error` transition so the user can retry without losing context. After success, return focus to the trigger." (https://vercel.com/geist/destructive-action-modal) "Set `aria-labelledby` to the `Modal.Title` id so screen readers announce the title on open." (https://vercel.com/geist/modal) "Keep the Cancel button literally `Cancel` so screen-reader users hear a stable dismissal label across destructive flows." (https://vercel.com/geist/modal) Ours: `role="alertdialog"` named by its title and described by its consequence; the note is `role="note"` with its icon hidden. Focus starts on Cancel, or in the field with `verify`.',
|
|
93
93
|
},
|
|
@@ -107,7 +107,7 @@ export const USAGE = [
|
|
|
107
107
|
module: "entry-scene",
|
|
108
108
|
family: "Compositions",
|
|
109
109
|
summary: "Nadia's entry screen, contained: the approved picture of the surface behind, the wordmark at the upper left, Nadia's ribbon and her words centred as one group. The screen is black in every theme.",
|
|
110
|
-
when:
|
|
110
|
+
when: 'Nadia\'s installer and the desktop\'s sign-in, start, update and failure screens, which paint the same screen; a page that shows that screen beside other things; the top of every Nadia pairing drawer, contained at 16:9 with only its short status ("Connecting Telegram", "Linked", "Code expired"): a longer sentence stands under the scene, never in it, and the code or QR the phone takes, with its expiry, then the steps on the phone follow it.',
|
|
111
111
|
instead: "The Portal's entry pages are its funnel frame with the shared entry header; Alveare Server's entry is the HiveScene; a wait inside the product is a WaitingLine.",
|
|
112
112
|
behaviour: "It holds no state and decides nothing: which view is open, the words and when the screen ends belong to whoever mounts it. Required: the picture, the wordmark and the heading, because every entry screen has all three; a screen that leaves one out does not compile. It fills a box of the window's own shape (`aspectRatio`), so the picture's figure stands on the window's floor (`pictureFeet`). A failure quiets the picture and never removes it. Its children stand in order: the message, the actions, the progress line, the stage list.",
|
|
113
113
|
words: 'The heading names the surface and is never seen. Instructions and status are one plain sentence that changes only when the real stage changes ("Loading your tools").',
|
|
@@ -120,7 +120,7 @@ export const USAGE = [
|
|
|
120
120
|
summary: "A new record, or one or two values from a command, in a modal dialog.",
|
|
121
121
|
when: '"Use Modal when a decision must block the rest of the page. For persistent associated context where the underlying page stays readable, use `Sheet` on desktop or `Drawer` on mobile." (https://vercel.com/geist/modal) Ours: a person adds a record through a few fields, or changes one or two values a command asks for: new customer, add a mailbox, add an MCP server.',
|
|
122
122
|
instead: '"Skip Modal for routine create flows that have a dedicated page; route to the page instead." (https://vercel.com/geist/modal) "Confirm destructive actions in a Modal. `Drawer` and `Sheet` don’t fully dim the page, so they read as too soft for a delete or revoke." (https://vercel.com/geist/modal) Ours: a record already in a list edits in its row with `RowEditForm`; a choice from a catalogue is a `CatalogDrawer`; a setup in steps with a wait is a `FormDrawer` with `job="steps"`; a consequence that asks nothing is confirmed in a `ConfirmDialog`.',
|
|
123
|
-
behaviour: '"Allow Escape and outside-click to dismiss non-destructive Modals; gate dismissal on destructive ones with unsaved input." (https://vercel.com/geist/modal) Ours: centred over a scrim without blur, 540 px wide, a bottom sheet on a phone: the title and its help, the fields in a 12 px column, then the footer, which stays at the bottom while a tall form scrolls, with Cancel at the leading edge and the primary at the trailing edge, in one row also on a phone. `FormDialogForm` puts the fields in the dialog\'s own scroll body and the actions in its fixed footer; no other overlay is nested inside. A refusal or a failed save sits above the footer and the fields keep what was typed. While its save runs it holds open, Cancel and the primary hold, and the waiting line runs under them. With `unsaved.dirty`, Escape and a press outside are held back and `unsaved.onDismissBlocked` runs so the caller can ask; Close and Cancel always close. A form whose primary takes something away, such as declining a company with a note for the record, sets `destructive` on `FormDialogForm`: the primary turns red, as `ConfirmDialog`\'s destructive confirm does, and nothing else changes. How long it stays open while work goes on follows
|
|
123
|
+
behaviour: '"Allow Escape and outside-click to dismiss non-destructive Modals; gate dismissal on destructive ones with unsaved input." (https://vercel.com/geist/modal) Ours: centred over a scrim without blur, 540 px wide, a bottom sheet on a phone: the title and its help, the fields in a 12 px column, then the footer, which stays at the bottom while a tall form scrolls, with Cancel at the leading edge and the primary at the trailing edge, in one row also on a phone. `FormDialogForm` puts the fields in the dialog\'s own scroll body and the actions in its fixed footer; no other overlay is nested inside. A refusal or a failed save sits above the footer and the fields keep what was typed. While its save runs it holds open, Cancel and the primary hold, and the waiting line runs under them. With `unsaved.dirty`, Escape and a press outside are held back and `unsaved.onDismissBlocked` runs so the caller can ask; Close and Cancel always close. A form whose primary takes something away, such as declining a company with a note for the record, sets `destructive` on `FormDialogForm`: the primary turns red, as `ConfirmDialog`\'s destructive confirm does, and nothing else changes. How long it stays open while work goes on follows the product-design skill\'s rule/wait-shows-where-it-lives and living-elements.md "System waits".',
|
|
124
124
|
words: '"`Modal.Title` is a Title Case statement, never a question. `Transfer Project` is correct; `Transfer Project?` is wrong." (https://vercel.com/geist/modal) "Primary button is `Verb + Noun` and matches the title verb (`Transfer Project` title pairs with `Transfer Project` button). Never `Confirm`, `OK`, or a bare verb on a destructive primary." (https://vercel.com/geist/modal) "Cancel literal stays `Cancel`. Acknowledgment-only Modals (after a key reveal, after a one-time-show) use `Done`, never `OK` or `Close`." (https://vercel.com/geist/modal) Ours: the title and the primary are sentence case, where Geist writes Title Case: the title names the job and its object, "New customer", "Add a mailbox"; the primary repeats it, "Create customer", "Add mailbox"; a destructive primary names what it takes away, "Decline company", never a bare "Decline".',
|
|
125
125
|
access: '"Set `aria-labelledby` to the `Modal.Title` id so screen readers announce the title on open." (https://vercel.com/geist/modal) "Trap focus inside the Modal while it’s open and return focus to the trigger after close. Restore body scroll on the same tick the Modal unmounts." (https://vercel.com/geist/modal) "After an error inside the Modal, keep focus inside so the user can retry; after success, return focus to the trigger." (https://vercel.com/geist/modal) Ours: a modal dialog with a Close named by `closeLabel`; focus starts in its first field or `initialFocus` and returns to the opener or `finalFocus`. Escape and Close close it unless the save runs.',
|
|
126
126
|
},
|
|
@@ -131,7 +131,7 @@ export const USAGE = [
|
|
|
131
131
|
summary: "The right-side sheet for a catalogue or a setup in steps, at one width.",
|
|
132
132
|
when: "Ours: choosing from a catalogue too long for a dialog (through `CatalogDrawer`), or setting something up in several steps with a wait: connect a messaging channel, Telegram's code.",
|
|
133
133
|
instead: "\"Don’t use Sheet to confirm destructive actions. The default `modal=false` keeps the page interactive, which weakens severity for a delete or revoke.\" (https://vercel.com/geist/sheet) Ours: a new record from a few fields is a `FormDialog`; a record already in a list edits in its row with `RowEditForm`; a fact on the record's own page changes in place in its section; a consequence is confirmed in a `ConfirmDialog`; a phone's short job is a `Drawer`.",
|
|
134
|
-
behaviour: '"Sheet defaults to `modal=false` so toasts and other high-z elements stay reachable. Keep that default unless the sheet owns the screen." (https://vercel.com/geist/sheet) "Pick `side` from the trigger location: a row inspector slides from `right`, a global filter from `left`. Don’t change sides mid-session." (https://vercel.com/geist/sheet) "Outside-click does not auto-close, so always render an explicit close affordance and honor Escape." (https://vercel.com/geist/sheet) Ours: a modal `Sheet` from the right edge over the scrim, because the drawer owns the screen, at the Sheet\'s one width that no caller sets. The header holds the step ("Step 2 of 3", in mono) over the title, which stays the job\'s name, then the description and Close; the body scrolls between the header and a footer that stays, with no fill or rule of its own, Cancel then the primary at its trailing edge. A press outside does not close it; Escape does, unless `unsaved.dirty` holds it back. Cancel holds while a save runs. How long it stays open while work goes on follows
|
|
134
|
+
behaviour: '"Sheet defaults to `modal=false` so toasts and other high-z elements stay reachable. Keep that default unless the sheet owns the screen." (https://vercel.com/geist/sheet) "Pick `side` from the trigger location: a row inspector slides from `right`, a global filter from `left`. Don’t change sides mid-session." (https://vercel.com/geist/sheet) "Outside-click does not auto-close, so always render an explicit close affordance and honor Escape." (https://vercel.com/geist/sheet) Ours: a modal `Sheet` from the right edge over the scrim, because the drawer owns the screen, at the Sheet\'s one width that no caller sets. The header holds the step ("Step 2 of 3", in mono) over the title, which stays the job\'s name, then the description and Close; the body scrolls between the header and a footer that stays, with no fill or rule of its own, Cancel then the primary at its trailing edge. A press outside does not close it; Escape does, unless `unsaved.dirty` holds it back. Cancel holds while a save runs. How long it stays open while work goes on follows the product-design skill\'s rule/wait-shows-where-it-lives and living-elements.md "System waits".',
|
|
135
135
|
words: '"Title is Title Case and names the entity (`Deployment Details`, `Member Profile`), not the page action." (https://vercel.com/geist/sheet) "Body is read-mostly: sentence case prose with Title Case sub-headings. Action buttons are optional; when present, follow `Verb + Noun`." (https://vercel.com/geist/sheet) Ours: the title is sentence case and names the job and its object: "Connect Telegram", "Add a skill". The step reads "Step N of M". The primary says what it does: "Connect", "Continue", never "OK".',
|
|
136
136
|
access: '"Trap focus inside the sheet while it’s open and return focus to the trigger row on close so keyboard users keep their place in the list." (https://vercel.com/geist/sheet) "Provide a visible close button labeled `Close` (or an icon button with `aria-label="Close"`) since clicking outside doesn’t dismiss." (https://vercel.com/geist/sheet) "Announce the sheet with `aria-labelledby` pointing at the title; pair it with `aria-describedby` only when the body is short and load-bearing." (https://vercel.com/geist/sheet) Ours: a modal dialog named by its title; focus returns to the opener on close, or to `finalFocus` when the opener is gone. The step is read before the title.',
|
|
137
137
|
},
|
|
@@ -163,8 +163,8 @@ export const USAGE = [
|
|
|
163
163
|
family: "Compositions",
|
|
164
164
|
summary: "One object's page: the object card with its name, commands, facts, rows that open and one link elsewhere, then its sections as cards.",
|
|
165
165
|
when: "One thing a person opened from a list and now reads or acts on: a customer, a partner, an Installation, a Library entry.",
|
|
166
|
-
instead: "\"Use Context Card to reveal entity metadata on hover or focus: a user, a deployment, a project, an API key.\" (https://vercel.com/geist/context-card) Ours: that hover is a `HoverCard`, never this page. A list of records is a CollectionPage; a page of settings only is a SettingsPage, whose cards are SettingsSections; an Agent's Edit page in Nadia's window opens on its AgentProfileCard, the documented exception. A card of values a person saves is a setting card, never this one.",
|
|
167
|
-
behaviour: "\"For a static key/value metadata block on a detail page, use `Description`.\" (https://vercel.com/geist/entity) \"The right column holds at most one or two controls. If the row needs more, move secondary actions into a `Dots Menu`.\" (https://vercel.com/geist/entity) \"Lead the left column with a scannable identifier: an `Avatar` or icon, a Title Case label, then sentence-case secondary metadata (`Member since Mar 14, 2026`).\" (https://vercel.com/geist/entity) \"Don’t put interactive controls in the title slot. Buttons, menus, and links belong in the content (`<dd>`) or in the parent layout, not the label (`<dt>`).\" (https://vercel.com/geist/description) Ours:
|
|
166
|
+
instead: "\"Use Context Card to reveal entity metadata on hover or focus: a user, a deployment, a project, an API key.\" (https://vercel.com/geist/context-card) Ours: that hover is a `HoverCard`, drawn inside this package by a component such as `RecordTime`, never this page. A list of records is a CollectionPage; a page of settings only is a SettingsPage, whose cards are SettingsSections; an Agent's Edit page in Nadia's window opens on its AgentProfileCard, the documented exception. A card of values a person saves is a setting card, never this one.",
|
|
167
|
+
behaviour: "\"For a static key/value metadata block on a detail page, use `Description`.\" (https://vercel.com/geist/entity) \"The right column holds at most one or two controls. If the row needs more, move secondary actions into a `Dots Menu`.\" (https://vercel.com/geist/entity) \"Lead the left column with a scannable identifier: an `Avatar` or icon, a Title Case label, then sentence-case secondary metadata (`Member since Mar 14, 2026`).\" (https://vercel.com/geist/entity) \"Don’t put interactive controls in the title slot. Buttons, menus, and links belong in the content (`<dd>`) or in the parent layout, not the label (`<dt>`).\" (https://vercel.com/geist/description) Ours: where the product draws a path, the path above the page names the object's parent, and the product's section navigation stands between the path and the card. As Vercel's deployment page (Deployment Details, then its steps), the object card is the first card of the page: a header bar with the name at the start and the object's commands at the end (a secondary, then the primary as the filled button, then the three dots, in `PageActions`' order, on the name's row while the name keeps 128 px, as on a phone, and under it otherwise; the primary is the one thing the object waits on its viewer for, such as approving a company that waits for approval, beside its alternative as the secondary, and an object with nothing waiting has none), the mark at 64 stands beside the name and optional line in the header, for every kind of object, with no preview box, since a product object has no picture of itself as a deployment has its screenshot; full-width facts follow in four columns once they have 36rem and two below (an object that exists always has one; an object not made yet, such as an account's plan before it chooses one, has none, and its card is the header alone, its name saying so and, for a viewer who may, its primary making it), each a muted label over its value in body text, then an optional footer with a hint at the start and one link at the end. Optional `entries` follow in a card of their own 12 px under it: rows that open one by one, each with its chevron first (it turns down when open), its title, and its summary at the trailing edge, as Vercel's Build Logs and Deployment Checks rows; an open entry's panel starts under its title, and on a card narrower than 28 rem, as on a phone, at the card's edge, so its sections keep the chevron's room; an entry marked `defaultOpen` opens with the page, for a link that names it. The footer takes a link only, so no Save or other command of the object fits in it; the object's changes live in its sections, each a setting card with its own footer. The sections follow, 24 apart, each an `ObjectSection`, `ObjectFacts`, a `RecordList` with its `heading`, a `SettingsSection` or an `ActivityFeed`, drawing its own states; a section earns a card when it owns a decision, never for every label and value. The card is neutral; colour belongs to the company's compact identity, a semantic fact value, or an entry's status summary, with no coloured card ground.",
|
|
168
168
|
words: '"Keep right-column buttons Verb + Noun (`Remove Member`, `Resend Invite`). Bare verbs like `Remove` or `Confirm` lose context once the row scrolls offscreen." (https://vercel.com/geist/entity) "Title slot is Title Case noun (`Last Deployed`, `Build Duration`); content is sentence case unless the value is a literal identifier, ID, or timestamp that should be preserved verbatim." (https://vercel.com/geist/description) Ours: sentence case throughout. The name as the object is called everywhere else; the line says what it is and whose ("Customer of Partner Alpha · since 3 August 2026"); a fact\'s label is a noun ("Plan"), its value the figure; an entry\'s title is a noun phrase; the hint is one sentence ("To update it, push to the main branch."); the link names where it goes ("Deployments"); the menu\'s trigger reads "More for {name}".',
|
|
169
169
|
access: '"Geist renders `<dl>`/`<dt>`/`<dd>` so screen readers announce each key/value pair as a definition." (https://vercel.com/geist/description) "Don’t wrap the component in extra paragraphs that break the list semantics." (https://vercel.com/geist/description) Ours: with `headingProps` the name is the page\'s h1; without them it is text, for a product whose chrome already titles the page. The mark is decorative beside the name. Each entry is an h2 heading holding a button with `aria-expanded` that controls its panel.',
|
|
170
170
|
},
|
|
@@ -196,9 +196,9 @@ export const USAGE = [
|
|
|
196
196
|
family: "Compositions",
|
|
197
197
|
summary: "The top of a product page: its title, and the page's actions on the title's row.",
|
|
198
198
|
when: "The top of every page, collection, working page and settings page alike: the title at heading size, `PageActions` at the trailing edge of its row.",
|
|
199
|
-
instead: "An object's own header is `ObjectPage`'s. The path above it is the top bar's `Breadcrumb`; filters, search and sort sit in the toolbar below.",
|
|
200
|
-
behaviour: "The title is always there and the actions arrive through the `PageActions` slot, so the page draws its commands once. On a phone the title keeps its row with one action, as Vercel's does; it gives way, and the actions wrap under it, only when they leave it less than 128 px. Under the title sits the `description`: one muted line saying what the page's concept is, on every page that is a destination or a section. It ends in a link to learn more when there is one, and never counts or introduces anything else. The description is neutral; no hue sits in the header.",
|
|
201
|
-
words: "The title is the page's name as the sidebar writes it: *Customers*, *Agents*. The description is one sentence in the product's words, without a full stop when it ends in a link.",
|
|
199
|
+
instead: "An object's own header is `ObjectPage`'s: a page that opens with the object's own header or card, such as an Agent's Profile, has that as its title and no `PageHeader` above it. A plain list's page draws no title row (`unseen`), as `CollectionPage`'s usage page decides. The path above it is the top bar's `Breadcrumb`; filters, search and sort sit in the toolbar below.",
|
|
200
|
+
behaviour: "The header stands in the page's own column, so the title and the page's cards share one left edge. The title is always there and the actions arrive through the `PageActions` slot, so the page draws its commands once. On a phone the title keeps its row with one action, as Vercel's does; it gives way, and the actions wrap under it, only when they leave it less than 128 px. Under the title sits the `description`: one muted line saying what the page's concept is, on every page that is a destination or a section, as every Vercel page does. It ends in a link to learn more when there is one, and never counts or introduces anything else. It is the page's only explanation: no other line introduces, explains or counts the page, and no line of text stands loose under a card or a list. What a card's reader needs is the card's own description or footer line, and a lasting condition is a notice above what it concerns. The description is neutral; no hue sits in the header.",
|
|
201
|
+
words: "The title is the page's name as the sidebar writes it: *Customers*, *Agents*. Inside an object worked from a section sidebar, the title is the section's name: *Apps*. The description is one sentence in the product's words, saying what the page's concept does and where it applies, without a full stop when it ends in a link.",
|
|
202
202
|
access: "The title is the page's `h1`; DOM order is visual order.",
|
|
203
203
|
},
|
|
204
204
|
{
|
|
@@ -209,7 +209,7 @@ export const USAGE = [
|
|
|
209
209
|
when: "“Use `<Entity>` for a row of descriptive content paired with one or two controls (member rows, integration rows, domain rows).” (https://vercel.com/geist/entity) Ours: the records are things a person opens or acts on and that name themselves: projects, deployments, domains, members, integrations, Agents, Skills, mailboxes. A list inside another page: an Overview's exceptions, an object page's \"Needs attention\". A page whose whole job is the list is a `CollectionPage`, which draws this. Values edited in place (a domain, an environment variable) are the same rows with an `editor`: the row expands into its form. Of the three kinds of list, entity rows and rows edited in place are this; records compared across columns are a `DataTable`.",
|
|
210
210
|
instead: "“For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity) “For a static key/value metadata block on a detail page, use `Description`.” (https://vercel.com/geist/entity) Ours: Geist's `Table` is a `DataTable`: this list has no visible headings and at most three facts, so a fourth fact is a table, and anything more than a few facts lives on the record's page. A screen gives `RecordList` the records and what each one says, never its own toolbar, table, rows or menus, and nothing else draws a record row. Its `Description` is `ObjectFacts`. Events in time are an `ActivityFeed`. Reusable things a person adds from a catalogue are a `LibraryShelf`. A descriptive row with prose is an `Item`.",
|
|
211
211
|
behaviour: "One bordered card, a 1 px rule between records and none after the last. A row is 72 px, with 16 px above and below, and its columns stand left to right at the widths the list declares, so a person reads every list the same way: the `select` box (40 px, only when the list is picked from, an optional column), the identity (the rest: the one column without a size), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring (52 px, only when the record has steps to be ready) and the commands (as wide as the widest row's buttons, a failed action's next steps and the three dots after them need, worked out from their labels, each label at most 8 px a character and a button holding the longer of its label and its pending label, the dots at their 44 px touch target; 64 px for the three dots alone; never narrower than a `commandsSize` the caller gives, which two lists on one page share so their columns line up although only one has buttons). A `checklist` puts the record's `ProgressChecklist` ring just before its commands, where Vercel ends a project's row with its Production Checklist; the ring opens its own drawer, never the row. Every row has its 32 px mark, its name (600) and, under it, one muted 14 px line, which `wraps=\"detail\"` lets wrap in full where the person must read it whole; `name` and the mark are required; a record with nothing to say under its name leaves the line out and is the name alone, never a dash. Give every column a `size` in pixels; the name takes the rest. With `layout=\"line\"`, as on Vercel's Projects page, the facts and the status share one muted line, joined by a middle dot, in a column as wide as the name's, and the row stays one line (mark, name over its line, that summary, the time, the ring, the three dots) on a card wide enough for its sized columns and 160 px each for the name and the summary, and on a narrower card the summary and the time move under the name as muted text joined by a middle dot that wraps, the status keeping its mark whole and breaking between its words only when it alone is wider than the line, in the same row, their labels read by assistive technology only. Rows of `columns` follow the same rule once the card is narrower than their columns: the facts and the time leave the row for that muted text, wrapping so every value stays readable, never a labelled list, and the status stands beside the name, which ends in an ellipsis before it, so the exception is never the part a phone's line cuts. `facts` takes at most three. A menu keeps every command in the three dots, one alone included, as Vercel's Environment Variables and Members rows do: a button stands on a row only where the list names it as `command`, the record's main job, on every row that can do it, so one list never mixes rows ending in a button with rows ending in dots. The commands never take the name's room: once the row is compact, its commands column holds only the three dots and the row's own buttons stand under the name, beside a failed action's next steps, outside the row's link, so pressing one never opens the record. Every column of the records' attributes stands on every row, as Vercel's lists keep theirs, so a person reads one attribute down a column: a record with no value for a fact draws `TableValue`'s muted dash, with the fact's `missing` read in its place; status is only for the exception, so a healthy record's status cell stays empty and the records that need a person stand out; the commands column, which holds no attribute, stands only while a record has a command, a menu or a message, or the rows open, and it widens for a failed action's next steps only while a row shows one. Never the three dots before the button, a decorative icon for the record's mark, a status on every row, or a destructive button on every row: a destructive command stays in the three dots. A `line` row's summary joins only the facts the record has, so it never ends in a dot. A failed or refused action of the record shows as its catalogue message inside its own row, never a notice under the row: it replaces the detail line, with its next steps beside its commands, or under the message on a card too narrow for the row's columns. With `open` the whole row is one target and takes the `accent` hover, with no chevron, as Vercel's Deployments rows open theirs; a row that opens nothing never reacts to hover. Opening is the row's alone: the three dots never hold a command that only shows the record (*Details*, *View*, *Open*). With `editor` the record's row opens its form under its line. `empty` is required: `null` is the choice to draw nothing for a list with no records, and any other value is the state it draws. A list that is a section of another page takes `heading`: its title, the one line under it, and at the trailing edge the card's `actions`, such as its Add command and a muted count, drawn as every card draws them, so the list and its commands are one card, never a list inside a setting card. A note about the whole list is `footer.note`: one muted line, an optional *Learn more* after it at the left and one secondary action at the right, in a strip of its own under the count and the paging, as Vercel ends its deployments list (\"Deployment retention is enabled. Learn more\", *View recently deleted*). A list a person picks from (`select`) says what the chosen records do together: while any is chosen, the footer's count becomes theirs (\"2 selected\") and their one command stands at the footer's end as an outline button (\"Invite 2\"), so choosing never changes the page's title row; the record's own main job stays its row's `command`, so a person never has to choose a record to act on it. Colour is neutral, the name in ink and every other cell in the body grey, except the status badge and a failed action's message. “Pick the variant by what the user needs: no-results for a filtered list that returned zero rows, blank slate or informational for a resource the user hasn’t created, cleared for completed work, permission for role or tier denials, error for a failed load.” (https://vercel.com/geist/empty-state) Ours: `failed`, `noMatch` and `empty` are those variants, drawn inside the card. “The right column holds at most one or two controls. If the row needs more, move secondary actions into a `Dots Menu`.” (https://vercel.com/geist/entity) Ours: one or two row commands (outline buttons of 32 px) stand before the three dots (36 px), the Dots Menu. “Render the Skeleton variant (`entity-with-skeleton`) during load instead of an empty row, and swap to real content once data resolves.” (https://vercel.com/geist/entity) Ours: three still skeleton rows hold the place, in a region that announces what replaces them; then the first that holds: the failed read, no match, the empty state, the rows.",
|
|
212
|
-
words: '“Lead the left column with a scannable identifier: an `Avatar` or icon, a Title Case label, then sentence-case secondary metadata (`Member since Mar 14, 2026`).” (https://vercel.com/geist/entity) Ours: the name is the record\'s own and the labels around it are sentence case, not Title Case. “Keep right-column buttons Verb + Noun (`Remove Member`, `Resend Invite`). Bare verbs like `Remove` or `Confirm` lose context once the row scrolls offscreen.” (https://vercel.com/geist/entity) Ours: the list names each kind of row button once, in `commands`, so every row that does a job draws the same words at the same width; the record\'s own name goes in the row\'s `accessibleName`, never in the label. “Column headers (`<Table.Head>`) are Title Case nouns or noun phrases: `Last Used`, `Requests (7d)`, `Created`, `Status`. Never sentences.” (https://vercel.com/geist/table) “Render — in cells where a value is unknown or not applicable. Don’t substitute N/A, null, or an empty string.” (https://vercel.com/geist/table) Ours: a list is the records\' attributes shown as data, not written as text. Its columns are the few attributes a person compares across the records to decide what to do with one (a deployment\'s status, environment, commit, branch and time), chosen from that job, never from what there is to say about a record. A cell holds the value alone, in the same shape down its column: a name, a kind ("Customer"), a count with its unit ("3 keys"), an amount; its position, the mark of its kind (`icon`, as Vercel marks a branch before "main") and its type say what it is, so the hidden heading needs no words in the cell. Never a sentence that restates the column ("Through Partner Alpha", "Joins as a company"), and never a word in place of a missing value ("Not available", "No Partner"): `of` returns nothing and the list draws the dash, and `nadicodeai/record-fact-no-stand-in` refuses the word given by `??`, a presence check or a guard clause. A known zero stays the count ("0 Agents") and a complete report that found nothing keeps its word ("None"), as `
|
|
212
|
+
words: '“Lead the left column with a scannable identifier: an `Avatar` or icon, a Title Case label, then sentence-case secondary metadata (`Member since Mar 14, 2026`).” (https://vercel.com/geist/entity) Ours: the name is the record\'s own and the labels around it are sentence case, not Title Case. “Keep right-column buttons Verb + Noun (`Remove Member`, `Resend Invite`). Bare verbs like `Remove` or `Confirm` lose context once the row scrolls offscreen.” (https://vercel.com/geist/entity) Ours: the list names each kind of row button once, in `commands`, so every row that does a job draws the same words at the same width; the record\'s own name goes in the row\'s `accessibleName`, never in the label. “Column headers (`<Table.Head>`) are Title Case nouns or noun phrases: `Last Used`, `Requests (7d)`, `Created`, `Status`. Never sentences.” (https://vercel.com/geist/table) “Render — in cells where a value is unknown or not applicable. Don’t substitute N/A, null, or an empty string.” (https://vercel.com/geist/table) Ours: a list is the records\' attributes shown as data, not written as text. Its columns are the few attributes a person compares across the records to decide what to do with one (a deployment\'s status, environment, commit, branch and time), chosen from that job, never from what there is to say about a record. A cell holds the value alone, in the same shape down its column: a name, a kind ("Customer"), a count with its unit ("3 keys"), an amount; its position, the mark of its kind (`icon`, as Vercel marks a branch before "main") and its type say what it is, so the hidden heading needs no words in the cell. Never a sentence that restates the column ("Through Partner Alpha", "Joins as a company"), and never a word in place of a missing value ("Not available", "No Partner"): `of` returns nothing and the list draws the dash, and `nadicodeai/record-fact-no-stand-in` refuses the word given by `??`, a presence check or a guard clause. A known zero stays the count ("0 Agents") and a complete report that found nothing keeps its word ("None"), as `TableValue` says; a word that names a kind of its own, a glossary term such as "Direct customer", is a value. A fact\'s `label`, the status\'s and the time\'s are the nouns the headings would be ("Partner", "State", "Asked"). The name\'s line under it is the one place a record is described in words, and the time keeps its verb\'s sentence ("Updated 3h ago"), as the approved canvas rules. Every string is the product\'s: `label` names the list, a time\'s `phrase` writes its sentence, `missing` is what a screen reader hears behind a dash, the menu\'s `label` reads "More for {record}". A row command names its result in sentence case ("Edit domain"). A status is the exception\'s word ("Needs attention", "Can\'t sign in"), never "Active" on every row, and never the state a row\'s own command already says: a row that ends in "Resend link" carries no "Link sent". The footer holds a count or the paging, never a help sentence: guidance a step needs lives in that step.',
|
|
213
213
|
access: '“Wrap the loading region in `aria-busy="true"` and announce completion with `aria-live="polite"` on the destination container, not the skeleton itself.” (https://vercel.com/geist/skeleton) Ours: the loading rows sit in one `SkeletonRegion` that is busy while they stand and announces what replaces them. A table named by `label`, its column headings read by assistive technology only; the commands column\'s is `commandsHeader`, and empty without one, since its controls name themselves, never the list\'s name a second time. The row link carries `open.label`; the three dots carry the menu\'s `label`, and the menu\'s first line names the record. The loading rows are a status named by `loadingLabel`, inside the one live region that announces what replaces them. “For multi-select rows, the leading `Checkbox` carries `aria-label="Select {entity name}"` so the row is selectable without relying on the visual label.” (https://vercel.com/geist/entity) Ours: each box is named by `select.label`, which reads "Select {record}".',
|
|
214
214
|
},
|
|
215
215
|
{
|
|
@@ -239,7 +239,7 @@ export const USAGE = [
|
|
|
239
239
|
module: "settings-page",
|
|
240
240
|
family: "Compositions",
|
|
241
241
|
summary: "A page of settings: section cards across the page's width under its title, each saving its own values.",
|
|
242
|
-
when: "A place whose job is changing how something behaves: an account's profile, a company's identity, Nadia's notifications.",
|
|
242
|
+
when: "A place whose job is changing how something behaves: an account's profile, a company's identity, Nadia's notifications. Every page of settings is this composition, whether it belongs to the person, to the platform or to one record's Settings tab, so the column keeps its width and its field layout from one entry of a settings menu to the next.",
|
|
243
243
|
instead: 'One object\'s page with a settings card among its sections is an ObjectPage; "Place it once per app, in the footer or settings, not duplicated across pages." (https://vercel.com/geist/theme-switcher) Ours: Theme and Language, which apply on change, stay in the account menu.',
|
|
244
244
|
behaviour: "One setting per card (the card's shapes are SettingsSection's: one field, a row of short parts of one value, rows of switches or of selects), the cards stacked 24 apart in the settings column (`ReadingColumn` `settings`, 960 px) under the page's header, which the product's page frame draws with its title and description, as Vercel's settings cards fill their column and stop there, with no heading between them; a field inside keeps its own bound. A page that mixes cards with other content, such as a table or a list of rules, is not a SettingsPage: its sections take a plain h2 above each card. The page draws no header and no save of its own: each SettingsSection saves from its footer. The danger zone closes the page, in rising severity: transfer, then pause, then delete; only delete is `tone=\"error\"`, and only delete and pause take a button in a hue.",
|
|
245
245
|
words: "The sections' titles and lines; a card's title is never the page's h1.",
|
|
@@ -250,11 +250,11 @@ export const USAGE = [
|
|
|
250
250
|
module: "settings-section",
|
|
251
251
|
family: "Compositions",
|
|
252
252
|
summary: "A card of one setting that says what changing it does and ends in a footer.",
|
|
253
|
-
when: "One setting a person changes on a SettingsPage or as a section of an ObjectPage: Personal details, Company identity, Notifications. A typed value takes `save
|
|
254
|
-
instead: "Read-only facts of an object are a SettingsFactsSection; a table or a list of records is a TableCard;
|
|
255
|
-
behaviour: '"Groups related form controls inside a bordered card with optional footer actions." (https://vercel.com/geist/fieldset) Ours: one setting per card, a single SettingsField with the description its only help, unless the card\'s description covers several settings: then they are its SettingsRows, switches and selects together. A typed value (a name, a URL, a server, a port, a key) gets its own card. A semantic subgroup of related controls inside a field, such as radios or checkboxes, is a `FieldSet` with a `FieldLegend`. Several settings in one card are declared by SettingsRows, never by classes at the call site. "Use Toggle for a single boolean setting where ON takes effect immediately, like `Password Protection` or `Auto-Cancel Builds`." (https://vercel.com/geist/toggle) "Pair with a form footer only when the setting needs an explicit `Save` step." (https://vercel.com/geist/toggle) "Disable Toggle only when the action is impossible (missing plan, locked policy); pair with helper text or a `Tooltip` that names the resolver." (https://vercel.com/geist/toggle) Ours: a switch never applies on change; it is a row of the card, a draft until the footer\'s Save, as Vercel\'s settings cards are. A switch blocked from above is shown off and disabled, the footer saying why and never a tooltip. Required: the title and the description. A `status` stands right after the title, as Vercel\'s plan card puts "Active" after "Pro Plan". The header\'s `actions` are drawn as every card draws them (`CardActions`: the muted meta, up to two secondaries as outline buttons, the primary as the filled one, the three dots), a way to another page among them as an outline button named for it; a card whose value is itself shown there, as Vercel\'s Team Avatar, takes `control` instead. They stand at the title\'s right; on a card narrower than 28 rem they keep the title\'s row and the description runs under both, as Vercel\'s cards read on a phone, and when the title\'s longest word would not fit beside them they move under the title, so they never cover it. The footer\'s left line (`footerHint`, `save.hint`) is optional and specific to the card, never a generic line repeated on every card: a limit, what a value is for, a plan it needs, a link; absent, it is nothing, and a card with neither a line nor a button has no footer. Ours: `save`: a typed value, one card with its own Save in the footer, always visible. The section owns the changed state: Save stays disabled until a field differs from what is saved and says `pendingLabel` while saving with Cancel beside it; a completed save calls `saved`, and the product raises one toast from its catalogue ("Completion toasts follow `{Noun} {past-participle}`: `Blob deleted`, `Domain added`, `Environment variable saved`. Never include `successfully`; the action name implies it." https://vercel.com/geist/toast), and Save returns to disabled, with no saved state in the footer. Ours: the section never raises a toast itself. A failed save keeps every value and shows under its field, or above the footer when no field owns it. `tone` marks a state with a command (a failed payment, a trial ending): a 1px border and a footer tinted in the hue with its line in it, the line saying the condition in words; title, line, fields and buttons stay neutral, an outline secondary then a default primary. A button takes the hue of its command, not of the card: `destructive` (red) for a permanent loss (Delete), `warning` (amber) for a disruptive command that can be undone (Pause, Archive). A delete card is `tone="error"` with the object\'s summary as its body; an archive card is neutral with a `warning` button in the footer. "Use a Note for inline contextual feedback next to the field, card, or section it describes: a region change warning above a region picker, a rate-limit notice next to a usage gauge." (https://vercel.com/geist/note) "One Note per concept." (https://vercel.com/geist/note) Ours: a message about the fields inside is a MessageNotice in the body, the card staying neutral. "Disabled checkboxes still need a Tooltip naming the reason; a greyed box with no explanation reads as a bug." (https://vercel.com/geist/checkbox) Ours: `lockedReason` (Geist\'s disabled wall) is the reason, written as the footer\'s line, not in a tooltip; it keeps the fields in view, inert with muted text, under a not-allowed cursor, the title and line unchanged; `unlock` is the way to get access, left out when nothing the person does unlocks it. A locked section has no `save` and no header `actions`.',
|
|
256
|
-
words: '"Helper text is sentence case, one sentence with a trailing period, on a sibling element wired through `aria-describedby`." (https://vercel.com/geist/input) Ours: the description is that helper text for the whole card, and no field has its own. "Render an optional one-sentence description as a sibling under the label that explains ON only. Don’t describe OFF; it’s the negation." (https://vercel.com/geist/toggle) Ours: a
|
|
257
|
-
access: "\"Provide an accessible name through `children`, `aria-label`, or `aria-labelledby`.\" (https://vercel.com/geist/toggle) Ours: the title is the section's h2, or an h3 with `headingLevel` inside an ObjectPage's row, and names the form that saves it
|
|
253
|
+
when: "One setting a person changes on a SettingsPage or as a section of an ObjectPage: Personal details, Company identity, Notifications. A typed value takes `save`, and so does a switch, a theme, a language or a pick from a short list: each is a draft until the footer's Save applies it. Also a plan-gated feature, a delete card, one read-only value (an ID as a `TextWithCopyButton`, no Save), and a paid quantity (its stepper field, the price as the description, a two-fact summary under it).",
|
|
254
|
+
instead: "Read-only facts of an object are a SettingsFactsSection; a table or a list of records is a TableCard; a record's edit in a list is a RowEditForm.",
|
|
255
|
+
behaviour: '"Groups related form controls inside a bordered card with optional footer actions." (https://vercel.com/geist/fieldset) Ours: one setting per card, a single SettingsField with the description its only help, unless the card\'s description covers several settings: then they are its SettingsRows, switches and selects together. A typed value (a name, a URL, a server, a port, a key) gets its own card. A semantic subgroup of related controls inside a field, such as radios or checkboxes, is a `FieldSet` with a `FieldLegend`. Several settings in one card are declared by SettingsRows, never by classes at the call site. The card\'s header and fields share one uninterrupted body, and only its footer has a divider. "Use Toggle for a single boolean setting where ON takes effect immediately, like `Password Protection` or `Auto-Cancel Builds`." (https://vercel.com/geist/toggle) "Pair with a form footer only when the setting needs an explicit `Save` step." (https://vercel.com/geist/toggle) "Disable Toggle only when the action is impossible (missing plan, locked policy); pair with helper text or a `Tooltip` that names the resolver." (https://vercel.com/geist/toggle) Ours: a switch never applies on change; it is a row of the card, a draft until the footer\'s Save, as Vercel\'s settings cards are. A switch blocked from above is shown off and disabled, the footer saying why and never a tooltip. Required: the title and the description. A `status` stands right after the title, as Vercel\'s plan card puts "Active" after "Pro Plan". The header\'s `actions` are drawn as every card draws them (`CardActions`: the muted meta, up to two secondaries as outline buttons, the primary as the filled one, the three dots), a way to another page among them as an outline button named for it; a card whose value is itself shown there, as Vercel\'s Team Avatar, takes `control` instead. They stand at the title\'s right; on a card narrower than 28 rem they keep the title\'s row and the description runs under both, as Vercel\'s cards read on a phone, and when the title\'s longest word would not fit beside them they move under the title, so they never cover it. The footer\'s left line (`footerHint`, `save.hint`) is optional and specific to the card, never a generic line repeated on every card: a limit, what a value is for, a plan it needs, a link; absent, it is nothing, and a card with neither a line nor a button has no footer. Ours: `save`: a typed value, one card with its own Save in the footer, always visible. The section owns the changed state: Save stays disabled until a field differs from what is saved and says `pendingLabel` while saving with Cancel beside it; a completed save calls `saved`, and the product raises one toast from its catalogue ("Completion toasts follow `{Noun} {past-participle}`: `Blob deleted`, `Domain added`, `Environment variable saved`. Never include `successfully`; the action name implies it." https://vercel.com/geist/toast), and Save returns to disabled, with no saved state in the footer. Ours: the section never raises a toast itself. A failed save keeps every value and shows under its field, or above the footer when no field owns it. `tone` marks a state with a command (a failed payment, a trial ending): a 1px border and a footer tinted in the hue with its line in it, the line saying the condition in words; title, line, fields and buttons stay neutral, an outline secondary then a default primary. A button takes the hue of its command, not of the card: `destructive` (red) for a permanent loss (Delete), `warning` (amber) for a disruptive command that can be undone (Pause, Archive). A delete card is `tone="error"` with the object\'s summary as its body; an archive card is neutral with a `warning` button in the footer. "Use a Note for inline contextual feedback next to the field, card, or section it describes: a region change warning above a region picker, a rate-limit notice next to a usage gauge." (https://vercel.com/geist/note) "One Note per concept." (https://vercel.com/geist/note) Ours: a message about the fields inside is a MessageNotice in the body, the card staying neutral. "Disabled checkboxes still need a Tooltip naming the reason; a greyed box with no explanation reads as a bug." (https://vercel.com/geist/checkbox) Ours: `lockedReason` (Geist\'s disabled wall) is the reason, written as the footer\'s line, not in a tooltip; it keeps the fields in view, inert with muted text, under a not-allowed cursor, the title and line unchanged; `unlock` is the way to get access, left out when nothing the person does unlocks it. A locked section has no `save` and no header `actions`.',
|
|
256
|
+
words: '"Helper text is sentence case, one sentence with a trailing period, on a sibling element wired through `aria-describedby`." (https://vercel.com/geist/input) Ours: the description is that helper text for the whole card, and no field has its own. "Render an optional one-sentence description as a sibling under the label that explains ON only. Don’t describe OFF; it’s the negation." (https://vercel.com/geist/toggle) Ours: a card of one switch says in its description what turning it on does. The title names the values ("Personal details"); the description says what changing them does, in one line; the footer line is a Learn more link, a limit ("Use 32 characters at most."), what stays unaffected, or what is blocked and why ("Ask an owner to change this."); Save and Saving come from the product\'s catalogue, and so does the toast a `saved` callback raises; a delete card\'s description opens "Permanently delete".',
|
|
257
|
+
access: "\"Provide an accessible name through `children`, `aria-label`, or `aria-labelledby`.\" (https://vercel.com/geist/toggle) Ours: the title is the section's h2, or an h3 with `headingLevel` inside an ObjectPage's row, and names the form that saves it. The footer's line is one status, announced politely; a failure under a field marks the control invalid and describes it. Locked fields are inert, so the section's title, description and reason are what a screen reader meets.",
|
|
258
258
|
},
|
|
259
259
|
{
|
|
260
260
|
name: "useCatalogRows",
|
|
@@ -338,9 +338,9 @@ export const USAGE = [
|
|
|
338
338
|
module: "page-actions",
|
|
339
339
|
family: "Actions",
|
|
340
340
|
summary: "A page's actions, drawn on its title's row. The row has one owner: a page kept hidden for a quick return has given it back, and a second `PageActions` on the page a person sees throws in development and in tests. Outside a `PageActionsHostProvider`, they render where they stand.",
|
|
341
|
-
when: "The actions of a collection, an object or an overview page, on the title's row at its trailing edge. A
|
|
342
|
-
instead: "A row's actions are the row's one button and its `ActionMenu`. A collection toolbar holds search and filters, never a page action. A page whose parts each have commands gathers them in the one `PageActions` of the component that owns the page; a part never draws a second.",
|
|
343
|
-
behaviour: "The page's commands, the same on each of its sibling tabs and whatever its list shows or has chosen: only the viewer's permission removes one, so the filled button a person found on one tab is filled on the next. A command on chosen records is the list's own (`RecordList`'s `select.chosen`), and a record's is its row's. One per page: the title row has one owner, so a second `PageActions` on the page a person sees would hide the first's commands without a word. It throws in development and in tests, and in production the one that mounted last keeps the row. A page kept hidden for a quick return (an `Activity` with `mode=\"hidden\"`) has given the row back and does not count. Takes `period`, `secondary`, `primary` and `menu` and draws their order and variants itself: the period, outline, default, then the three dots last. The menu needs two commands or more; a single extra command is the secondary. A primary whose job comes in a few kinds takes `choices`: its button opens a menu of them aligned to its end, each with its icon, as Vercel's \"Add New…\" does; a kind that needs its own fields opens its dialog from its row. A destination outside the product ends in the arrow. A running command (`pending`) keeps its place and icon, says its pending word and holds, and the type requires `pendingLabel` whenever `pending` is set. A command here is never destructive or warning: those sit in the danger zone of the page, in a card.",
|
|
341
|
+
when: "The actions of a collection, an object or an overview page, on the title's row at its trailing edge. A settings page (`SettingsPage`) has none: each section saves from its footer.",
|
|
342
|
+
instead: "A row's actions are the row's one button and its `ActionMenu`. A collection toolbar holds search and filters, never a page action, except on a list page that draws no title row, where `CollectionPage` ends the toolbar with the page's actions. A page whose parts each have commands gathers them in the one `PageActions` of the component that owns the page; a part never draws a second.",
|
|
343
|
+
behaviour: "An action always sits on the title of the thing it acts on, never on a tab's. The page's commands, the same on each of its sibling tabs and whatever its list shows or has chosen: only the viewer's permission removes one, so the filled button a person found on one tab is filled on the next. A command on chosen records is the list's own (`RecordList`'s `select.chosen`), and a record's is its row's. One per page: the title row has one owner, so a second `PageActions` on the page a person sees would hide the first's commands without a word. It throws in development and in tests, and in production the one that mounted last keeps the row. A page kept hidden for a quick return (an `Activity` with `mode=\"hidden\"`) has given the row back and does not count. Takes `period`, `secondary`, `primary` and `menu` and draws their order and variants itself: the period, outline, default, then the three dots last. The menu needs two commands or more; a single extra command is the secondary. A primary whose job comes in a few kinds takes `choices`: its button opens a menu of them aligned to its end, each with its icon, as Vercel's \"Add New…\" does; a kind that needs its own fields opens its dialog from its row. A destination outside the product ends in the arrow. A running command (`pending`) keeps its place and icon, says its pending word and holds, and the type requires `pendingLabel` whenever `pending` is set. A command here is never destructive or warning: those sit in the danger zone of the page, in a card.",
|
|
344
344
|
words: 'The primary is the page\'s main job as verb and noun: "Invite member", "New Agent". Its choices are the kinds, as nouns: "Folder", "Documents", "Web page". The pending word is its -ing form: "Inviting member". The menu names the page\'s record at its top and keeps the destructive command last, after a divider.',
|
|
345
345
|
access: 'DOM order is visual order. A command whose label does not name its target carries `accessibleName`. A running command is `aria-busy` and keeps focus. The three dots carry "More for {record}"; the menu returns focus to them when it closes.',
|
|
346
346
|
},
|
|
@@ -361,7 +361,7 @@ export const USAGE = [
|
|
|
361
361
|
family: "Inputs",
|
|
362
362
|
summary: "A text box that empties itself: a clear button once it has text, and Escape.",
|
|
363
363
|
when: '"Text input with a clear button that resets the value on Escape." (https://vercel.com/geist/clearable-input) Ours: a single-line value a person may want to empty in one move: a filter, a search, a reference they paste and replace.',
|
|
364
|
-
instead: "A collection's search is `CollectionSearch`. A value that is never emptied is `Input`. A box with a fixed prefix or suffix is `Input
|
|
364
|
+
instead: "A collection's search is `CollectionSearch`. A value that is never emptied is `Input`. A box with a fixed prefix or suffix is `Input`. A value shown with its copy button is `TextWithCopyButton`. Any other fixed part beside a box is an `InputGroup`, which only this package's components draw.",
|
|
365
365
|
behaviour: 'Same ring, halo, hover, disabled and error as `Input`; colour sits where it does there and nowhere else. The clear button shows only while the box has text and is enabled, as an Esc key cap flush against the end of the box that darkens on hover and keeps a transparent fill (a close mark on a touch screen, which has no Escape). Pressing it, or Escape inside the box, empties the value, calls `onClear` and puts focus back in the box. Escape on an empty box does nothing here, so it closes the dialog or drawer around it. "Automatically clears the input if escape is pressed." (https://vercel.com/geist/input) "Displays the <kbd>⌘</kbd> <kbd>K</kbd> shortcut to indicate that the input supports a command palette." (https://vercel.com/geist/input) "Transitions to showing <kbd>Esc</kbd> when the field is dirty." (https://vercel.com/geist/input) Ours: the `shortcut` keys are one cap per key (*⌘* then *K*, 4 px apart, 10 px from the edge), hidden on a touch screen. `loading` marks the box busy and, after a second, draws the waiting line along its bottom edge; nothing spins and the results stay. `label` and `error` draw the `Field` parts around the box as on `Input`, and a string `label` requires `id`; a box with no name does not compile. `className` lands on the box.',
|
|
366
366
|
words: 'The clear button is named for what it empties (*Clear search*, *Clear filter*). "Placeholders show an example value (`my-awesome-project`, `example.com`), never instructions like `Enter your project name`." (https://vercel.com/geist/input) Ours: the placeholder may also be the scope.',
|
|
367
367
|
access: "A visible `label` or `aria-label` names the box. The clear button is a named button, `aria-keyshortcuts` Escape; the prefix and the keys are hidden from assistive technology. `aria-busy` while `loading`.",
|
|
@@ -405,7 +405,7 @@ export const USAGE = [
|
|
|
405
405
|
family: "Inputs",
|
|
406
406
|
summary: "One line of free text.",
|
|
407
407
|
when: '"Retrieve text input from a user." (https://vercel.com/geist/input) "Pick `<Input>` for a single line of free-form text such as names, domains, or tokens." (https://vercel.com/geist/input)',
|
|
408
|
-
instead: '"Switch to `Textarea` the moment content can wrap to multiple lines." (https://vercel.com/geist/input) "Use `Combobox` when the value comes from a known list the user filters by typing." (https://vercel.com/geist/input) "For an inline search box, set the `search` variant with a scoped placeholder like `Search projects`; don’t embed a `<SearchInput>` inside an unrelated form." (https://vercel.com/geist/input) Ours: there is no `search` variant. A collection\'s search is `CollectionSearch`, and a value people empty often is `ClearableInput`. A short known set is radios or a select.
|
|
408
|
+
instead: '"Switch to `Textarea` the moment content can wrap to multiple lines." (https://vercel.com/geist/input) "Use `Combobox` when the value comes from a known list the user filters by typing." (https://vercel.com/geist/input) "For an inline search box, set the `search` variant with a scoped placeholder like `Search projects`; don’t embed a `<SearchInput>` inside an unrelated form." (https://vercel.com/geist/input) Ours: there is no `search` variant. A collection\'s search is `CollectionSearch`, and a value people empty often is `ClearableInput`. A short known set is radios or a select. Geist\'s `prefixContainer` and `suffixContainer` are `prefix` and `suffix`. A server-given value with its copy button is `TextWithCopyButton`. A button inside the box, a block addon or a textarea toolbar is an `InputGroup`, which only this package\'s components draw. The card around a field is a `SettingsField` or a `Field`.',
|
|
409
409
|
behaviour: 'Sizes `sm` (32 px), default (36 px) and `lg` (40 px, larger type) are shared by every field, so fields in a row line up. The edge is a 1 px ring outside the box that darkens on hover; focus makes it full strength with a soft 4 px halo around it. Colour sits in one place: an error turns the ring red and fills the halo, always and also while focused, and colours the message; the label, fill, text and placeholder stay neutral. Disabled steps down in fill and text, never in opacity, and ignores hover. `label` and `error` draw the `Field` parts around the box: the label above it, the message under it with an alert mark. `prefix` and `suffix` are filled cells inside the ring, divided from the text, with 14 px marks (8 px of padding at `sm`); the suffix reads in the text colour. `look="plain"` sets both on the box\'s own fill with no divider, flush against the text. `rounded` makes the box a pill. `className` lands on the box. "Validate on blur, not on every keystroke; surface the message by passing a string to `error`." (https://vercel.com/geist/input) "Trim leading and trailing whitespace before submit so ` example.com` and `example.com` resolve to one value." (https://vercel.com/geist/input) "Keep the field focusable while saving; pair `disabled` with a spinner only when input is impossible." (https://vercel.com/geist/input) "Don’t wrap a labelled `<Input>` in a `Tooltip`; put the explainer on a sibling icon button so the label stays announced." (https://vercel.com/geist/input) "Helper text is sentence case, one sentence with a trailing period, on a sibling element wired through `aria-describedby`." (https://vercel.com/geist/input) Ours: help is the one-line description of the card or form around the field, not a line under it. Nothing spins while a field saves. Only the forms `Field` names trim.',
|
|
410
410
|
words: '"Labels are short Title Case nouns: `Project Name`, `Domain`, `Environment Variable Name`." (https://vercel.com/geist/input) "Placeholders show an example value (`my-awesome-project`, `example.com`), never instructions like `Enter your project name`." (https://vercel.com/geist/input) "Validation names the field and the constraint, ends in a period, and skips `please` (`Project name is required.`, `Code must be 6 digits.`)." (https://vercel.com/geist/input) Ours: the label is a short noun in sentence case with no colon, not Title Case, and the example comes from our catalogue (*Bizeta Arredamenti*).',
|
|
411
411
|
access: '"Passing a string to `label` requires `id`; the `InputPropsWithStringLabelAndId` union won’t compile without it and screen readers lose the association." (https://vercel.com/geist/input) Ours: a field whose name is drawn elsewhere (a toolbar\'s search, a table cell) takes `aria-label` or `aria-labelledby` instead, and one with no name does not compile. The error is joined through `aria-describedby`. Use the right `type`, `autocomplete` and `inputMode`. "For icon-only affordances inside a row of inputs, use `<Button shape="circle" svgOnly aria-label="…">` rather than an unlabeled icon." (https://vercel.com/geist/input)',
|
|
@@ -460,7 +460,7 @@ export const USAGE = [
|
|
|
460
460
|
family: "Inputs",
|
|
461
461
|
summary: "One setting: its label above its control, and what went wrong under it.",
|
|
462
462
|
when: "The one value of a SettingsSection: a name, an address, a choice, a switch.",
|
|
463
|
-
instead: "A field of a drawer's or a dialog's form is a Field from the form's own owner; a read-only fact is a SettingsFactsSection; several switches and selects in one card are SettingsRows
|
|
463
|
+
instead: "A field of a drawer's or a dialog's form is a Field from the form's own owner; a read-only fact is a SettingsFactsSection; several switches and selects in one card are SettingsRows.",
|
|
464
464
|
behaviour: '"Helper text is sentence case, one sentence with a trailing period, on a sibling element wired through `aria-describedby`." (https://vercel.com/geist/input) Ours: label required, no help line: the card\'s description helps, and the (i) `info` is for a part of a value that needs a sentence. The control is 20rem wide under its label (`controlWidth`: `full` for a textarea, `natural` for a segmented control). `control="choice"` puts a checkbox or radio before its sentence; `control="switch"` puts the word for the switch\'s state after it and requires `stateLabel`. "Validate on blur, not on every keystroke; surface the message by passing a string to `error`." (https://vercel.com/geist/input) Ours: a validation `error` updates as the value is corrected, and it or a failed save about this field shows under the control and marks it invalid; colour sits on the control\'s edge and the message, never the label.',
|
|
465
465
|
words: '"Labels are short Title Case nouns: `Project Name`, `Domain`, `Environment Variable Name`." (https://vercel.com/geist/input) Ours: sentence case, a noun for the value ("Display name"). "Validation names the field and the constraint, ends in a period, and skips `please` (`Project name is required.`, `Code must be 6 digits.`)." (https://vercel.com/geist/input) Ours: an error says what to do next; `info.text` is one sentence and `info.label` names its button ("About display name"); a switch shows its state word ("Enabled", "Disabled") beside it.',
|
|
466
466
|
access: '"Don’t wrap a labelled `<Input>` in a `Tooltip`; put the explainer on a sibling icon button so the label stays announced." (https://vercel.com/geist/input) Ours: that sibling button is the (i) `info`. The control receives its id, `aria-invalid` and `aria-describedby` through `controlProps`, so the label, the info and the error are read with it. The info button has its own name and opens on focus.',
|
|
@@ -526,7 +526,7 @@ export const USAGE = [
|
|
|
526
526
|
family: "Choices",
|
|
527
527
|
summary: "The order a collection's rows are read in, at the toolbar's trailing edge.",
|
|
528
528
|
when: "A collection whose rows can be read in more than one order: newest, name, cost.",
|
|
529
|
-
instead: "
|
|
529
|
+
instead: "A comparison table has no sortable heading: a `DataTable` takes the order this control sets as its `sorting`. Narrowing rows is `CollectionFilters`.",
|
|
530
530
|
behaviour: "An outline button names the order in force; its menu offers the others as radio rows with the current one checked. Choosing the current order changes nothing. It renders nothing without options.",
|
|
531
531
|
words: "The label says what the control does (*Sort by*); each option names an order: *Newest first*, *Name*.",
|
|
532
532
|
access: "The trigger reads the label and the current order: *Sort by: Newest first*. The options are menu radio items.",
|
|
@@ -790,7 +790,7 @@ export const USAGE = [
|
|
|
790
790
|
family: "Status",
|
|
791
791
|
summary: "What says which thing a record is, at a fixed size at the start of its row, its object's head or its feed line: an Agent's orb, an app's logo, a model maker's mark, a company's logo or initials, a person's picture, or a record kind's icon on its tile.",
|
|
792
792
|
when: "The first thing in a record's row (32), at the head of its object page (64), in a feed or a sidebar identity line (24), on a Library entry (40), for the company at the top of Nadia's list (28): wherever it tells a person which thing they are looking at.",
|
|
793
|
-
instead: "An icon beside a card's title, a KPI's label or a section heading only repeats the words and is left out. A picture for a first use or a whole-page moment is the empty state's or the page's own. A model is its `ModelIdentity`; a maker's mark beside a model's name in a list of models is `ModelMark` at 24.",
|
|
793
|
+
instead: "An icon beside a card's title, a KPI's label or a section heading only repeats the words and is left out. A row's, an object's, a feed's or a sidebar's mark is one of this component's kinds, never a decorative icon: a list gets its richness from real identity marks, never from decoration. A picture for a first use or a whole-page moment is the empty state's or the page's own. A model is its `ModelIdentity`; a maker's mark beside a model's name in a list of models is `ModelMark` at 24.",
|
|
794
794
|
behaviour: "Static, except an Agent's orb, which moves with her state. An Agent is always her real orb from the orb engine, at the largest orb size not above the mark's, with no tile and no ring, never an avatar or a painted circle, and `frame` lets the product wrap that orb, such as in the transition that carries her to her page; an app keeps its own logo in its bordered tile on the page ground, or its first letter when it has no logo; a record that belongs to a model maker, such as a key held at that maker, is the maker's `ModelMark` at the mark's size, with its initials when LobeHub has no mark for it; a company is its own logo, contained whole in its original colours and proportions on a dark ringed tile, as Vercel shows a project's favicon, and until a logo is found, or when the stored logo does not load, its initials in white on that same tile, so a found logo only replaces the letters; a company's mark is the same whatever its standing and whichever directory opened it, and a Partner is said in words where its standing matters, never by a colour; a person is their picture, then their initials, in a round mark; a record with no picture of its own takes its kind's own icon, the same icon its section has in the navigation (Mail for a mailbox, a server for an MCP server, a key for a password), in a ringed tile on the card ground; a skill takes the icon its hub card names, and the Skills icon when it names none, on that same neutral ringed tile, so the icon alone tells one skill from another and no colour stands for the kind; a plugin likewise takes the icon its hub card names, and the Plugins icon when it names none, on the same neutral ringed tile, since the colour of a Library row is its category label's alone; a record's own object picture, such as a Library skill's or plugin's, is drawn only at 64, at the head of its own page, on its kind's ground in the icon's place, because at a row's size its detail does not read. A record tile takes `{rounded.sm}` (6 px) corners, `{rounded.md}` (8 px) at 40 and 64; a company's tile and an app's tile take `{rounded.md}` at every size.",
|
|
795
795
|
words: "None of its own: the record's name stands beside it. Initials stand for a company or a person: the first letters of the name's first two words. An app with no logo takes the first letter of its name as a monogram, a model maker with no mark the initials of its slug, and no other kind takes letters.",
|
|
796
796
|
access: "Decorative beside the record's name. Alone, as in a narrow rail, `label` names it.",
|
|
@@ -865,7 +865,7 @@ export const USAGE = [
|
|
|
865
865
|
name: "RecordIdentity",
|
|
866
866
|
module: "record-identity",
|
|
867
867
|
family: "Status",
|
|
868
|
-
summary:
|
|
868
|
+
summary: "A record's identity in a row, as `RecordList` and `DataTable` draw it: its mark at 32, its name, and under it one muted `detail` line saying what the record is or where it comes from, so the row reads without a column heading.",
|
|
869
869
|
when: "The first cell of every collection row: the mark, the name, and one muted line saying what the record is or where it comes from, so the row reads without a heading.",
|
|
870
870
|
instead: "An Agent in a gallery is `AgentListRow`; a model is `ModelIdentity`. A descriptive item with prose and actions is `Item`.",
|
|
871
871
|
behaviour: "The mark stands 16 px before the name. The name is semibold (600) ink and the detail a muted 14 px line, two lines with no gap between them, so the row is an entity row; `mark` is required; a record with nothing to say under its name leaves `detail` out and is the name alone, never a dash, which is a table cell's missing value and not a record's. The name holds one line and ends in an ellipsis, whole in its title, with a `hint` such as an ID read after it. The detail is one line too and ends in an ellipsis, whole in its title when it is text; in a row on a card narrower than its columns, the facts that leave the row join it after a middle dot and wrap so every value stays readable, and a status that leaves the row stands beside the name, which ends in an ellipsis before it. `wraps` only when the name is the whole record, such as a memory: the name is then a sentence at the body's regular weight, not a name in semibold, and the detail wraps too. `wraps=\"detail\"` keeps the name a one-line name in semibold and wraps the detail in full, for a line the person must read whole, such as the code a request asks them to check. The table owns the link.",
|
|
@@ -877,11 +877,11 @@ export const USAGE = [
|
|
|
877
877
|
module: "status-badge",
|
|
878
878
|
family: "Status",
|
|
879
879
|
summary: "A record's state: a shape of dots and a word, in one of five tones.",
|
|
880
|
-
when:
|
|
881
|
-
instead: '"For non-deployment statuses (Workflow runs, Queue messages, Sandbox, Cron jobs), use a `Badge` with the canonical state vocabulary instead of repurposing the dot." (https://vercel.com/geist/status-dot) Ours: that `Badge` is `StatusBadge`. For a category (an installation, a partner) use `Tag`. For plain metadata (a role, a plan) use `Badge`. For a control reporting its own action use `ActionStatus`. A state beside its name still uses this component.',
|
|
882
|
-
behaviour: "\"Badges are static labels.\" (https://vercel.com/geist/badge) \"Don’t wire `onClick` onto them; promote to a Button or link if the user can act on the value.\" (https://vercel.com/geist/badge) Ours: a status never moves and is never a button. It is the tone's shape and the word, with no pill, no fill and no border, as Vercel's deployment list sets a state beside its time. The shape is filled with dots on a honeycomb grid, the material of the Agent orbs: an outline of evenly spaced dots and a field of dots inside it; gray's ring stays empty, the quiet tone. The dots take the tone's colour and the word the foreground colour; amber's outline takes its deep step so the triangle holds on white. `size` follows the type beside it: `sm` (a 14 px shape, 12 px word) in a small line such as an Agent's state line, `md` (16 px, 13 px) in a row, `lg` (20 px, 14 px) beside an object's name.",
|
|
880
|
+
when: "\"Use Badge for short, scannable metadata that sits next to the thing it describes: status, plan tier, environment, or role.\" (https://vercel.com/geist/badge) Ours: a record's state, when it sets the row apart: failed, waiting on a person, a step in motion, paused, connected. Gray is the default and every terminal state that needs no action; green is healthy or complete; red is unusable or failed; amber is waiting on a person's decision; blue is a step in motion. Each tone has its own shape: green a circle, blue a diamond, amber a triangle, red a square, gray an empty ring. \"Map meaning to color: `green` for healthy, `red` for error, `amber` for warning, `blue` for informational or production, `gray` for neutral.\" (https://vercel.com/geist/badge) Ours: success is green, danger red, warning amber, info blue, neutral gray, whatever the state's name, in our colour values. The tone and the word are required, and the type asks for both. The Portal, Nadia and Alveare draw every status with this one component. In a list or a feed it shows only for the exception, the record or event that differs from the others, such as a failure, a revocation or a wait for a person's decision; the usual state shows nothing, so a status never stands on every row. An Agent fleet's operational-state column and a run history's outcome are facts being compared, so each entry there keeps its badge, Ready and Completed included. An object's own status sits beside its name in the path.",
|
|
881
|
+
instead: '"For non-deployment statuses (Workflow runs, Queue messages, Sandbox, Cron jobs), use a `Badge` with the canonical state vocabulary instead of repurposing the dot." (https://vercel.com/geist/status-dot) Ours: that `Badge` is `StatusBadge`. For a category (an installation, a partner) use `Tag`. For plain metadata (a role, a plan) use `Badge`. For a control reporting its own action use `ActionStatus`. A state beside its name still uses this component. A single coloured dot is never a status, beside a visible label and inside an Agent row or filter included; the package exports no status-dot component. An Agent\'s orb stays her identity and her activity. How far a record is through the steps that make it ready is `ProgressChecklist`.',
|
|
882
|
+
behaviour: "\"Badges are static labels.\" (https://vercel.com/geist/badge) \"Don’t wire `onClick` onto them; promote to a Button or link if the user can act on the value.\" (https://vercel.com/geist/badge) Ours: a status never moves and is never a button. It is the tone's shape and the word, with no pill, no fill and no border, as Vercel's deployment list sets a state beside its time. The shape is filled with dots on a honeycomb grid, the material of the Agent orbs: an outline of evenly spaced dots and a field of dots inside it; gray's ring stays empty, the quiet tone. The dots take the tone's colour and the word the foreground colour; amber's outline takes its deep step so the triangle holds on white. `size` follows the type beside it: `sm` (a 14 px shape, 12 px word) in a small line such as an Agent's state line, `md` (16 px, 13 px) in a row, `lg` (20 px, 14 px) beside an object's name. A new state picks one of the five tones, never a new shape.",
|
|
883
883
|
words: '"Title Case, one word when possible, two max: `Active`, `Pending`, `Pro`, `Enterprise Trial`." (https://vercel.com/geist/badge) Ours: a state, not a verb (*Failed*, *Waiting for you*), in sentence case, one to three words, no trailing ellipsis. Italian runs a third longer: *In attesa di te*. "Match the canonical API or log term: `Production` not `Prod`, `Deployed` not `Live`, `Canceled` not `Cancelled` (the Vercel API uses one L)." (https://vercel.com/geist/badge) "Skip stuffing sentences inside (`Currently Active`, `You are on Pro`); the surrounding row supplies the context." (https://vercel.com/geist/badge)',
|
|
884
|
-
access: '"Don’t rely on color alone; the text has to be readable without it." (https://vercel.com/geist/badge) Ours: the word is the name; the shape is `aria-hidden`, so colour never carries the state alone. Not focusable. Each app keeps one value-to-tone map in one module; nothing else picks a status colour.
|
|
884
|
+
access: '"Don’t rely on color alone; the text has to be readable without it." (https://vercel.com/geist/badge) Ours: the word is the name; the shape is `aria-hidden`, so colour never carries the state alone. Not focusable. Each app keeps one value-to-tone map in one module; nothing else picks a status colour.',
|
|
885
885
|
},
|
|
886
886
|
{
|
|
887
887
|
name: "Tag",
|
|
@@ -921,8 +921,8 @@ export const USAGE = [
|
|
|
921
921
|
module: "command",
|
|
922
922
|
family: "Navigation",
|
|
923
923
|
summary: "Find anything across the product and go there.",
|
|
924
|
-
when: '"Use CommandMenu for a global, keyboard-first command palette that finds resources and runs actions across the app." (https://vercel.com/geist/command-menu) Ours: finding anything across the product and going there: an Agent, a customer, a page, a creation page (*New Agent*). Opened by ⌘K or the sidebar\'s Find. It goes to places and never runs a command.',
|
|
925
|
-
instead:
|
|
924
|
+
when: '"Use CommandMenu for a global, keyboard-first command palette that finds resources and runs actions across the app." (https://vercel.com/geist/command-menu) Ours: finding anything across the product and going there: an Agent, a customer, a page, a creation page (*New Agent*). Opened by ⌘K or the sidebar\'s Find. It names every place the sidebar names, every chat and every settings page; it goes to places and never runs a command.',
|
|
925
|
+
instead: "\"For a menu opened from a visible trigger on a single resource, use `Menu`; for right-click on a row, use `ContextMenu`.\" (https://vercel.com/geist/command-menu) \"Group items into pages (`Projects`, `Team Settings`) when a single flat list would exceed roughly 30 items or span multiple resource types.\" (https://vercel.com/geist/command-menu) Ours: one record's commands are its `ActionMenu` and, on right-click, its mirror `ActionContextMenu`; a page's are `PageActions`' `menu`. Search inside one collection is `CollectionSearch`. Choosing the page's scope is `ScopeSwitcher`. `CommandDialog` has no pages: its list is groups.",
|
|
926
926
|
behaviour: '"Bind `⌘K` on macOS and `Ctrl+K` elsewhere. Don’t reuse the binding for any in-page filter input; it’s a global shortcut." (https://vercel.com/geist/command-menu) "Open into the root page; preserve the search query when navigating back from a sub-page so the user’s typing isn’t lost." (https://vercel.com/geist/command-menu) "Trap focus inside the overlay while it’s open and return focus to the previously active element on close." (https://vercel.com/geist/command-menu) "Show a recent or default item set when the input is empty so the menu is useful before typing." (https://vercel.com/geist/command-menu) Ours: a solid surface, never glass; opens instantly, 640 px wide and 15% down the window; on a phone it is a bottom sheet, 640 px high with 8 px top corners and the list filling it. The input row stands above the list with a line under it, the field in large type with no icon and an *Esc* key at its end that closes the dialog and is the next stop after the field on Tab; the list scrolls past 436 px. The first row is highlighted on open. No match says so. Every row is 36 px with the pointer cursor, a group\'s heading is a muted 36 px row, a divider bleeds across the list. A row\'s shortcut is a `CommandShortcut` and a word or icon at its end is a `CommandSuffix`. Colour carries nothing: the highlighted row is a faint neutral wash with its text unchanged, group headings, suffixes and the empty line are muted, and no row, key or divider takes a hue. `CommandDialog` draws `Command` itself, so a product never mounts one; its parts are `CommandInput`, `CommandList`, `CommandEmpty`, `CommandGroup`, `CommandItem` and `CommandShortcut` (a `Kbd`).',
|
|
927
927
|
words: '"`<CommandMenu.Item>` children are Title Case verb phrases (`Deploy Project`, `Invite Team Member`). Avoid navigation phrasing like `Go to project page`; CommandMenu commands act, not browse." (https://vercel.com/geist/command-menu) "`CommandMenuPage.label` is Title Case and names the scope (`Projects`, `Team Settings`)." (https://vercel.com/geist/command-menu) "`CommandMenuPage.placeholder` is sentence case, action-oriented, and ends with `…` (`Search projects…`, `Type a command or search…`). Bare `Search…` is wrong because it doesn’t name the scope." (https://vercel.com/geist/command-menu) "`<CommandMenu.Group heading>` is Title Case, 1–2 words (`Actions`, `Recent`)." (https://vercel.com/geist/command-menu) Ours: groups are plural nouns in sentence case (*Agents*, *Go to*), one or two words. Items are names, or verb and noun for a creation page (*New Agent*), because the dialog goes to places. The placeholder names what is searched, never a bare "Search". No match quotes the query.',
|
|
928
928
|
access: '"Use `aria-live="polite"` on the result count so screen readers hear how the list narrows as the user types." (https://vercel.com/geist/command-menu) "Up/Down arrows move highlight, Enter activates, Escape closes. Backspace at an empty input pops the page stack." (https://vercel.com/geist/command-menu) "Display each item’s `keybind` as a `Kbd` slot so the shortcut is discoverable to sighted users and announced as a label to screen readers." (https://vercel.com/geist/command-menu) Ours: a dialog with a screen-reader `title` and `description`, both required; the *Esc* key is a button named by `closeLabel`, which is required; the field is a combobox over a listbox; the highlighted item is `aria-selected`. A polite live region reads `resultCount` as the list narrows, and it is required. `CommandInput` requires its `placeholder`, `CommandGroup` its `heading` and `CommandItem` its `onSelect`, so no field, group or row is left unnamed or inert; a row with no group stands outside a `CommandGroup`. A shortcut is a `CommandShortcut`, drawn as `kbd` elements. With no pages there is no stack for Backspace to pop.',
|
|
@@ -956,7 +956,7 @@ export const USAGE = [
|
|
|
956
956
|
summary: "Says which part of the account a page reads, and changes it.",
|
|
957
957
|
when: "Changing which part of the account a page reads, such as Analytics' scope, or switching between objects from the shell's top bar with `variant=\"navigation\"`.",
|
|
958
958
|
instead: "A viewer with one scope and nothing to create reads its name with no control, which this draws by itself. Finding anything is `CommandDialog`; narrowing rows is `CollectionFilters`.",
|
|
959
|
-
behaviour: "A ghost trigger, at most 16rem, opens a 288 px popover with focus in its search. Navigation omits the visible prefix, wraps the selected name on phones instead of cutting it, carries each option's identity mark and opens a 384 px popover constrained to the viewport. Type to filter, Enter chooses and closes; choosing the current one changes nothing. The caller writes the choice to the URL in `onValueChange`, so sibling pages keep it. An optional create command sits last.",
|
|
959
|
+
behaviour: "A ghost trigger, at most 16rem, opens a 288 px popover with focus in its search. Navigation omits the visible prefix, wraps the selected name on phones instead of cutting it, carries each option's identity mark and opens a 384 px popover constrained to the viewport. Type to filter, Enter chooses and closes; choosing the current one changes nothing. The caller writes the choice to the URL in `onValueChange`, so sibling pages keep it. Scope selectors preserve the authorized organization or account. An optional create command sits last.",
|
|
960
960
|
words: '`copy.label` names what is chosen ("Scope") beside the current scope\'s name. Search and empty lines name the thing: "Find a scope", "No scope matches".',
|
|
961
961
|
access: 'The trigger reads "Scope: All customers"; the popover has a hidden title; options are a listbox with the current one checked.',
|
|
962
962
|
},
|
|
@@ -966,7 +966,7 @@ export const USAGE = [
|
|
|
966
966
|
family: "Navigation",
|
|
967
967
|
summary: "A product's navigation column: where a person can go, with the account at its foot.",
|
|
968
968
|
when: "The one left column of the Portal and Nadia: a header, Find, groups of places, an object's sections when the column swaps, a band for the update or the way out, and the account. 256 px wide; the Portal's can be dragged between 224 and 384 px or collapsed to icons.",
|
|
969
|
-
instead: "Never a second column
|
|
969
|
+
instead: "Never a second column: an object's sections either swap this column (`SidebarSections`) or stand in a `TabsNav` band under the top bar, as the product's section navigation says. A page's own views are Tabs. A row that opens an area ends in `SidebarMenuChevron`.",
|
|
970
970
|
behaviour: 'Fills the cell its host gives it and stays in the page flow. `collapsible="icon"` (the default) collapses to 48 px icons with a tooltip name and becomes a sheet under 768 px; with `resize` a handle on its trailing edge drags it, steps it with the arrow keys, resets it on a double-click and collapses it on Enter. `collapsible="none"` is always open and never a sheet. A group is told apart by its label and its padding, never by a rule.',
|
|
971
971
|
words: 'Each row is a place\'s noun: "Agents", "Tasks", "Customers"; a count is a bare number. A sheet\'s title, description and Close label (`mobileTitle`, `mobileDescription`, `mobileCloseLabel`) are required; `resize`, when given, names the handle and comes from the catalogue.',
|
|
972
972
|
access: 'The column is a landmark; each row is a link or a button with its name, and the current one carries aria-current="page". The handle is a focusable separator with its value in px. The badge\'s number is read with its row.',
|
|
@@ -1019,8 +1019,8 @@ export const USAGE = [
|
|
|
1019
1019
|
name: "SidebarMenuChevron",
|
|
1020
1020
|
module: "sidebar",
|
|
1021
1021
|
family: "Navigation",
|
|
1022
|
-
summary: "Vercel's ›: the mark at the end of a row that swaps the column to that area's sub-menu: the Portal's Settings and
|
|
1023
|
-
when: "The last child of a `SidebarMenuButton` whose press replaces the places with the area's sections (`SidebarSections`), never of a row that only goes to a page or to a destination whose views are tabs (the Portal's Analytics
|
|
1022
|
+
summary: "Vercel's ›: the mark at the end of a row that swaps the column to that area's sub-menu: the Portal's Settings, Company and Library, Nadia's company.",
|
|
1023
|
+
when: "The last child of a `SidebarMenuButton` whose press replaces the places with the area's sections (`SidebarSections`), never of a row that only goes to a page or to a destination whose views are tabs (the Portal's Analytics).",
|
|
1024
1024
|
instead: "A count is `SidebarMenuBadge`; an external link says so in its name.",
|
|
1025
1025
|
behaviour: 'A 16 px muted chevron pushed to the row\'s end, mirrored in right-to-left. A `Sidebar` with `collapsible="icon"` hides it when collapsed; a column that is narrowed by its host (`collapsible="none"`) leaves it out when narrow: `{narrow ? null : <SidebarMenuChevron />}`.',
|
|
1026
1026
|
words: "None.",
|
|
@@ -1031,8 +1031,8 @@ export const USAGE = [
|
|
|
1031
1031
|
module: "sidebar-sections",
|
|
1032
1032
|
family: "Navigation",
|
|
1033
1033
|
summary: "The sidebar swapped to one object or one area: the way back, what you are in, and its sections.",
|
|
1034
|
-
when: "Inside an object, the same sidebar column shows these instead of the places: an
|
|
1035
|
-
instead: "The places a person can go are the sidebar's own groups; a
|
|
1034
|
+
when: "Inside an object, the same sidebar column shows these instead of the places: an Installation's sections in the Portal, Nadia's Edit and Settings sections. Inside an area whose pages are siblings a person moves between, the area's sub-menu without `identity`, as Vercel's Settings: the Portal's Settings, Company, Library and Account. The row that opens an area ends in `SidebarMenuChevron`; a row that only opens a page has none. Required: the way back and the nav's `label`; every section has an icon.",
|
|
1035
|
+
instead: "The places a person can go are the sidebar's own groups; a settings page that does not swap the column is a SettingsPage. Never a second column beside the first. “Tabs imply the views share scope, URL parent, and data model” (https://vercel.com/geist/tabs) Ours: an area whose pages hold different objects, with different lists and different ways to add, is this sub-menu, as Vercel's AI Gateway is; a destination whose pages are views of one reading keeps its Tabs, as Vercel's Analytics and OpenRouter's Activity do (the Portal's Analytics). An object's sections under the top bar are a `TabsNav` band.",
|
|
1036
1036
|
behaviour: "With `identity`: a back arrow row, then what you are in, then the sections. Without it, as Vercel's sub-menu: one row with a ‹ at its start and the area's name centred, then the sections as words alone. The back row returns to where the person came from and is disabled while leaving is blocked. One section is current and takes the selection fill; the rest stay neutral. A section that sets `group` opens a labelled group that holds the sections after it until another names its own; the label and the gap tell groups apart, never a rule. Narrow, the identity, the area's name and the labels leave, and each row keeps its icon with its name in a tooltip.",
|
|
1037
1037
|
words: 'The back row names where it goes ("Agents", "Back to workspace"); the identity is the object\'s own name; an area\'s `label` is its sidebar row\'s word ("Settings", "Company"); a group heading names the kind of settings ("Account"), in sentence case; sections are nouns ("Skills", "Members").',
|
|
1038
1038
|
access: 'The sections are a nav named by `label`; the current one carries aria-current="page". Without `identity` the back row is named by its `label` alone and the centred area name is read as text after it. The identity\'s mark is decorative beside its name.',
|
|
@@ -1043,8 +1043,8 @@ export const USAGE = [
|
|
|
1043
1043
|
family: "Navigation",
|
|
1044
1044
|
summary: "Panels of one surface that switch in place.",
|
|
1045
1045
|
when: '"Use Tabs to switch between sibling views inside a single page (`Overview`, `Logs`, `Settings`)." (https://vercel.com/geist/tabs) "Cap a Tabs row at 5–7 entries on desktop and 3–4 on mobile. Past that, consolidate or move secondary views behind a `Menu`." (https://vercel.com/geist/tabs) Ours: the cap is 7 on a desktop and 4 on a phone, for a row of line tabs.',
|
|
1046
|
-
instead: '"For navigation between unrelated pages, use a sub-menu, not Tabs." (https://vercel.com/geist/tabs) "Tabs imply the views share scope, URL parent, and data model." (https://vercel.com/geist/tabs) Ours: views with their own URL are `TabsNav`. A choice that changes a value is a `RadioGroup` or `ToggleGroup`. A stable destination belongs in the `Sidebar
|
|
1047
|
-
behaviour: '"Selecting a tab is instant; don’t trigger network confirmation or toast on tab change." (https://vercel.com/geist/tabs) "Reflect the active tab in the URL (query param or path) so deep-links and refresh restore state." (https://vercel.com/geist/tabs) "Disable individual tabs only for permission or empty-state reasons; pair the disabled tab with a `tooltip` that names the constraint." (https://vercel.com/geist/tabs) Ours: the `tooltip` is `disabledReason`, shown on hover and focus and kept as the tab\'s description; a tab is disabled only for a permission or an empty state, and `disabled` requires its `disabledReason`. One treatment among siblings, chosen through `variant`, never a page border: `line` (50 px high with 2 px sides, `body-sm` at 400, 24 px between tabs, a 2 px ink underline over the full-width row\'s 1 px rule) for a page\'s collections, `default` (a 32 px pill with 12 px sides, `label-sm` at 400, no gap between tabs, on the selection fill) for an object\'s sections. On a coarse or non-hover input a tab is at least 44 px high and wide, as a touch target. The page owns the chosen tab: `value` and `onValueChange` are required. There is no sliding underline. Colour is neutral only: the chosen tab is ink, the rest are muted until hover, and a disabled tab is never dimmed: in `line` it reads as an unchosen one, in `default` it sits on the selection fill with muted text, both with a not-allowed cursor.',
|
|
1046
|
+
instead: '"For navigation between unrelated pages, use a sub-menu, not Tabs." (https://vercel.com/geist/tabs) "Tabs imply the views share scope, URL parent, and data model." (https://vercel.com/geist/tabs) Ours: views with their own URL are `TabsNav`. A choice that changes a value is a `RadioGroup` or `ToggleGroup`. A stable destination belongs in the `Sidebar`, and a set of different things, such as Nadia\'s company sections, is pages there, never tabs. A tab never introduces a new scope: another company or Agent is another place, reached from the sidebar or a `ScopeSwitcher`, and a choice of whose things are listed is a filter in the toolbar. Two lists are never stacked with a tab row between them.',
|
|
1047
|
+
behaviour: '"Selecting a tab is instant; don’t trigger network confirmation or toast on tab change." (https://vercel.com/geist/tabs) "Reflect the active tab in the URL (query param or path) so deep-links and refresh restore state." (https://vercel.com/geist/tabs) "Disable individual tabs only for permission or empty-state reasons; pair the disabled tab with a `tooltip` that names the constraint." (https://vercel.com/geist/tabs) Ours: the `tooltip` is `disabledReason`, shown on hover and focus and kept as the tab\'s description; a tab is disabled only for a permission or an empty state, and `disabled` requires its `disabledReason`. One treatment among siblings, chosen through `variant`, never a page border: `line` (50 px high with 2 px sides, `body-sm` at 400, 24 px between tabs, a 2 px ink underline over the full-width row\'s 1 px rule) for a page\'s collections, under the title row and above the toolbar, `default` (a 32 px pill with 12 px sides, `label-sm` at 400, no gap between tabs, on the selection fill) for an object\'s sections. On a coarse or non-hover input a tab is at least 44 px high and wide, as a touch target. The page owns the chosen tab: `value` and `onValueChange` are required. The page keeps the choice in the URL, as a route or as `?tab=` with the first tab left out, so a reload, Back and a shared link return to it; switching never changes whose things are shown. There is no sliding underline. Colour is neutral only: the chosen tab is ink, the rest are muted until hover, and a disabled tab is never dimmed: in `line` it reads as an unchosen one, in `default` it sits on the selection fill with muted text, both with a not-allowed cursor.',
|
|
1048
1048
|
words: '"`tabs[].title` is Title Case, 1–2 words, and names the destination noun (`Overview`, `Logs`, `Settings`). Verbs belong on buttons; `View Logs` is wrong on a tab." (https://vercel.com/geist/tabs) "`tabs[].tooltip` is sentence case and explains the constraint (`Only visible to project owners.`), not the tab’s purpose." (https://vercel.com/geist/tabs) "Don’t append a count to the title (`Logs (12)`); use a badge slot instead and drop the badge at zero." (https://vercel.com/geist/tabs) Ours: the title is a noun with no icon, in sentence case (*Overview*, *Installations*), not Title Case. There is no badge slot: a count belongs to the list\'s footer. A reason is *Only owners see billing*. Italian (*Installazioni*) scrolls, never wraps or truncates.',
|
|
1049
1049
|
access: '"Keep Left/Right arrows moving focus across tabs and Enter/Space activating; don’t hijack with global shortcuts." (https://vercel.com/geist/tabs) "Label the tablist with `aria-label` when no visible heading sits above it (`aria-label="Sections"`)." (https://vercel.com/geist/tabs) "Maintain a visible focus ring on the active tab; don’t suppress focus styles for visual polish." (https://vercel.com/geist/tabs) Ours: the arrow keys move with one tab stop. `tablist`, `tab`, `tabpanel` with `aria-selected`. The row is named by `aria-label` or `aria-labelledby`, which the type requires; a disabled tab is `aria-disabled`.',
|
|
1050
1050
|
},
|
|
@@ -1086,9 +1086,9 @@ export const USAGE = [
|
|
|
1086
1086
|
module: "card",
|
|
1087
1087
|
family: "Data",
|
|
1088
1088
|
summary: "The surface of every card; on its own only a container inside a composition.",
|
|
1089
|
-
when: '"For in-product cards and dashboard tiles, use `Card`; Book is too decorative for repeated UI rows." (https://vercel.com/geist/book) Ours: only inside a composition that owns the job: the object card of an `ObjectPage`, the setting card of a `SettingsSection`, a KPI, a chart, a table. A new kind of card is a new composition, never a `Card` assembled at a call site.',
|
|
1089
|
+
when: '"For in-product cards and dashboard tiles, use `Card`; Book is too decorative for repeated UI rows." (https://vercel.com/geist/book) Ours: only inside a composition that owns the job: the object card of an `ObjectPage`, the setting card of a `SettingsSection`, a KPI, a chart, a table. A new kind of card is a new composition, never a `Card` assembled at a call site, and never a card holding only an introduction.',
|
|
1090
1090
|
instead: "\"Groups related form controls inside a bordered card with optional footer actions.\" (https://vercel.com/geist/fieldset) Ours: that card, a title and description, one control and a footer with help at the start and one action at the end, is `SettingsSection`. An object's card (a header bar with its name and commands, a body of facts, rows that open, a footer hint with one link elsewhere) is `ObjectPage`. The page's title row is never in a card. A row of a list is `Item`. A plane of brand colour is `BrandField`.",
|
|
1091
|
-
behaviour: '"One Note per concept." (https://vercel.com/geist/note) "Stacking three Notes on a card means the page architecture, not the Note copy, is wrong." (https://vercel.com/geist/note) "Use the Error component as a block surface when a section or page-level resource failed to load: a panel, a dashboard card, a route boundary." (https://vercel.com/geist/error) Ours: the corner and shadow come with `surface`: a raised card takes the larger corner. Never set a corner at the call site. `surface` defaults to `resting`, the resting height of "Elevation & Depth" in DESIGN.md. `CardHeader` lays out title, description and one `CardAction`. An action of one control (a button, a badge, a sparkline, the three dots) stands at the title\'s right, as Vercel keeps a card\'s Add on its title row on a phone; on a card narrower than 28rem the description runs under both, and the control moves under the title only when the title\'s longest word would not fit beside it, so it never covers it. An action of several controls moves under the description in a header narrower than 28rem (the header\'s own width, not the viewport\'s); `CardFooter` is a strip in the `recessed` role, one tone off the card body inside the card\'s edge, behind one seam in the border colour: `canvas-soft` below the white card in light, and `dark-canvas` below the resting body in dark; on the left one short muted line, only where it says something specific to that card (a limit such as *Please use 32 characters at maximum.*, what a value is for, the plan a feature needs or a link to learn more) and never one sentence every card repeats, on the right at most one button or link, the section\'s action. It is 56 px high whether or not it holds a button, and as high as its lines in a `size="sm"` card, the compact card of a side column or a figure. The two kinds differ in what their header and footer hold: an object card\'s header holds the object\'s commands and its footer only a link, so it never saves; a setting card\'s header holds a title, a description and
|
|
1091
|
+
behaviour: '"One Note per concept." (https://vercel.com/geist/note) "Stacking three Notes on a card means the page architecture, not the Note copy, is wrong." (https://vercel.com/geist/note) "Use the Error component as a block surface when a section or page-level resource failed to load: a panel, a dashboard card, a route boundary." (https://vercel.com/geist/error) Ours: the corner and shadow come with `surface`: a raised card takes the larger corner. Never set a corner at the call site. `surface` defaults to `resting`, the resting height of "Elevation & Depth" in DESIGN.md. `CardHeader` lays out title, description and one `CardAction`. An action of one control (a button, a badge, a sparkline, the three dots) stands at the title\'s right, as Vercel keeps a card\'s Add on its title row on a phone; on a card narrower than 28rem the description runs under both, and the control moves under the title only when the title\'s longest word would not fit beside it, so it never covers it. An action of several controls moves under the description in a header narrower than 28rem (the header\'s own width, not the viewport\'s); `CardFooter` is a strip in the `recessed` role, one tone off the card body inside the card\'s edge, behind one seam in the border colour: `canvas-soft` below the white card in light, and `dark-canvas` below the resting body in dark; on the left one short muted line, only where it says something specific to that card (a limit such as *Please use 32 characters at maximum.*, what a value is for, the plan a feature needs or a link to learn more) and never one sentence every card repeats, on the right at most one button or link, the section\'s action. It is 56 px high whether or not it holds a button, and as high as its lines in a `size="sm"` card, the compact card of a side column or a figure. The two kinds differ in what their header and footer hold: an object card\'s header holds the object\'s commands and its footer only a link, so it never saves; a setting card\'s header holds a title, a description and its `actions` or `control`, and its footer holds the Save, which also applies a switch in the card (`SettingsSection`). A card\'s or a section\'s title carries no icon, unless the card stands for one external system, whose mark it then carries. A card is neutral; colour enters only through a status inside it or a section\'s `tone`. `flush="bottom"` ends the card at its last child, for rows whose hairlines run to its bottom edge, as a footer does; `flush="all"` lets the content meet every edge with no gap between children, for one picture or grid that fills the card.',
|
|
1092
1092
|
words: "The title is a noun phrase naming what the card holds; the description one sentence directly under it, only when it adds something.",
|
|
1093
1093
|
access: "A plain container; give it `render={<section />}` with a heading when it is a region of the page.",
|
|
1094
1094
|
},
|
|
@@ -1121,8 +1121,8 @@ export const USAGE = [
|
|
|
1121
1121
|
summary: "Records compared across columns: the same facts for every record, read down a column and across a row, inside their `TableCard`.",
|
|
1122
1122
|
when: "“Use `<Table>` for tabular data where rows share the same shape and at least one column is sortable or comparable across rows.” (https://vercel.com/geist/table) Ours: the person compares: usage per Agent, statements, invoices, customers with their partner and count. The columns are fixed, each has a heading, and at least one is a figure or can be sorted. There are three kinds of list. Objects a person opens (a project, a deployment, a member, an integration) are entity rows: a `RecordList`. Values edited in place (a domain, an environment variable) are entity rows that expand into their form: a `RecordList`'s `editor`. Records compared across columns are this table.",
|
|
1123
1123
|
instead: "“For a row of descriptive content paired with a single action (membership row, integration row), use `Entity` instead.” (https://vercel.com/geist/table) “For a key/value metadata block on a detail page, use `Description`, not a two-column table.” (https://vercel.com/geist/table) Ours: Geist's `Entity` is a `RecordList` row. A registry of entities whose columns `RecordList` cannot hold, more than three facts beside a filter bar the product owns, as Vercel's Deployments list, is this table with `rows=\"entities\"`, which draws the same rows: headings for assistive technology only, 72 px rows, a `RecordIdentity` in the identity column. Its `Description` is `ObjectFacts`. A list on a page of its own is a `CollectionPage`. A descriptive list is `ItemGroup`.",
|
|
1124
|
-
behaviour: "Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is as wide as its definition's `size`, in pixels, and the columns without one share the rest, so a table gives a size to every column but the one that takes the spare width; a value too long for its column ends in an ellipsis, whole in its title (a record's name carries its own), unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle instead. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings (Vercel's Usage page: *Delivery network*, *Functions*): a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. A row never scrolls sideways and never gives a column without a size less than 160 px: on a card narrower than its columns (the sized ones and 160 px for each without a size, however wide that is; columns no card holds lay out this way on every card) the row keeps its name and its `primaryColumns`, and every other column leaves it, its value joining the one muted line under the name, joined by a middle dot (a `Tag` reads as its text there); entity facts wrap below the name so every value stays readable, while other rows end in an ellipsis unless a column `wraps`, or `dropped` when its `compact` says so, or beside an entity row's name, which ends in an ellipsis before it, when it says `name`, as Vercel's lists read on a phone: no labels, no second line; an `optional` column's empty value is left out of the line. A table whose every column is in `primaryColumns`, a settings matrix, lays out by its content there instead, so the name wraps beside the columns. A document's table, such as a legal page's, is read whole instead: its columns take the `wraps` option, so their words wrap and the row grows, and it keeps its header row; in the compact layout every cell but the identity wraps between words. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` (\"Page 2 of 7\") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right (Vercel's deployments list ends \"Deployment retention is enabled. Learn more\" with *View recently deleted*); it is the one place a table says a sentence. Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries. “When the underlying list is empty (filter cleared, never created), render `Empty State` outside the table rather than an empty `<Table.Body>`.” (https://vercel.com/geist/table) “After an async filter change, wrap the region in `aria-live=\"polite\"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state) Ours: empty sits outside the body, in a polite live region that stays in place so a filter that empties the table is announced. “Sortable column headers are buttons. The visible label stays Title Case; the sort-direction arrow is decorative and the button announces the next sort state to assistive tech.” (https://vercel.com/geist/table) Ours: the order has one owner, the app's `sorting`, which the URL holds, so no heading is a button and every page of a paged list follows one order. “Apply `tabular-nums` (or Geist Mono) to numeric columns so digits align across rows for comparison.” (https://vercel.com/geist/table) Ours: a numeric column trails in tabular figures.",
|
|
1125
|
-
words: '“Column headers (`<Table.Head>`) are Title Case nouns or noun phrases: `Last Used`, `Requests (7d)`, `Created`, `Status`. Never sentences.” (https://vercel.com/geist/table) “Render `—` in cells where a value is unknown or not applicable. Don’t substitute `N/A`, `null`, or an empty string.” (https://vercel.com/geist/table) “Use the canonical short relative-time form in cells (`2m ago`, `5h ago`); switch to `Mar 14, 2026` past 7 days. See `Relative Time Card`.” (https://vercel.com/geist/table) “Pagination labels are `Previous` and `Next`. Page-count copy reads `Page 2 of 7` or `21–40 of 142` with an en-dash inside the range.” (https://vercel.com/geist/table) Ours: headings are sentence case nouns with their unit, "Cost (€)", "Tokens", where Geist writes Title Case. The words of a time and of Previous and Next are the product\'s catalogue, in both languages. The footer is a count or the paging
|
|
1124
|
+
behaviour: "Every column has a `header`; a column without one does not compile. The headings are always visible, medium weight in the cells' body grey, 48 px high, with 12 px of room under the labels and then the rule, so the first row starts at the rule like every other; rows are 40 px. Each column is as wide as its definition's `size`, in pixels, and the columns without one share the rest, so a table gives a size to every column but the one that takes the spare width; a value too long for its column ends in an ellipsis, whole in its title (a record's name carries its own), unless the column `wraps`; a column marked `identifier` holds ids or paths and is cut in the middle instead. The last column trails unless it `wraps` or is `centered`; a `centered` column's heading and values sit in the middle of it. Records are divided by a 1 px rule, none after the last. The first and last columns stand in from the card's edges by the card's spacing, so the first lines up with the title. Records of several kinds stand in one table under `group` headings (Vercel's Usage page: *Delivery network*, *Functions*): a heading row that spans the columns, in ink, medium text, 36 px high with the same rule under it, one per group in the order the groups first appear, never a second table; a heading is the group's name and carries no figure of its own. A row that opens a record takes `accent` on hover, and any row on focus within and while its menu is open; a row that opens nothing never reacts to hover. A selected row takes `muted`; headers and footers never highlight and carry no fill. A row never scrolls sideways and never gives a column without a size less than 160 px: on a card narrower than its columns (the sized ones and 160 px for each without a size, however wide that is; columns no card holds lay out this way on every card) the row keeps its name and its `primaryColumns`, and every other column leaves it, its value joining the one muted line under the name, joined by a middle dot (a `Tag` reads as its text there); entity facts wrap below the name so every value stays readable, while other rows end in an ellipsis unless a column `wraps`, or `dropped` when its `compact` says so, or beside an entity row's name, which ends in an ellipsis before it, when it says `name`, as Vercel's lists read on a phone: no labels, no second line; an `optional` column's empty value is left out of the line. A table whose every column is in `primaryColumns`, a settings matrix, lays out by its content there instead, so the name wraps beside the columns. A document's table, such as a legal page's, is read whole instead: its columns take the `wraps` option, so their words wrap and the row grows, and it keeps its header row; in the compact layout every cell but the identity wraps between words. A bounded page's paging stands in the card's footer strip at its trailing edge, opposite `footer`, which stands at the leading edge: its `status` (\"Page 2 of 7\") before Previous and Next, which are the product's router links (`previousLink`, `nextLink`) when each page is its own address, and buttons otherwise; the one that leads nowhere stays, disabled. A note about the whole table is `footerNote`, in a strip of its own under that one: one muted line, an optional *Learn more* after it at the left and one secondary action at the right (Vercel's deployments list ends \"Deployment retention is enabled. Learn more\" with *View recently deleted*); it is the one place a table says a sentence. Colour is neutral: headings and cells in the body grey, no hue, except a status badge or a tone the cell itself carries. “When the underlying list is empty (filter cleared, never created), render `Empty State` outside the table rather than an empty `<Table.Body>`.” (https://vercel.com/geist/table) “After an async filter change, wrap the region in `aria-live=\"polite\"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state) Ours: empty sits outside the body, in a polite live region that stays in place so a filter that empties the table is announced. “Sortable column headers are buttons. The visible label stays Title Case; the sort-direction arrow is decorative and the button announces the next sort state to assistive tech.” (https://vercel.com/geist/table) Ours: the order has one owner, the app's `sorting`, which the URL holds and a `CollectionSort` above the list sets, so no heading is a button and every page of a paged list follows one order. “Apply `tabular-nums` (or Geist Mono) to numeric columns so digits align across rows for comparison.” (https://vercel.com/geist/table) Ours: a numeric column trails in tabular figures.",
|
|
1125
|
+
words: '“Column headers (`<Table.Head>`) are Title Case nouns or noun phrases: `Last Used`, `Requests (7d)`, `Created`, `Status`. Never sentences.” (https://vercel.com/geist/table) “Render `—` in cells where a value is unknown or not applicable. Don’t substitute `N/A`, `null`, or an empty string.” (https://vercel.com/geist/table) “Use the canonical short relative-time form in cells (`2m ago`, `5h ago`); switch to `Mar 14, 2026` past 7 days. See `Relative Time Card`.” (https://vercel.com/geist/table) “Pagination labels are `Previous` and `Next`. Page-count copy reads `Page 2 of 7` or `21–40 of 142` with an en-dash inside the range.” (https://vercel.com/geist/table) Ours: headings are sentence case nouns with their unit, "Cost (€)", "Tokens", where Geist writes Title Case. The words of a time and of Previous and Next are the product\'s catalogue, in both languages. The footer is a count or the paging, never a help sentence: guidance a step needs lives in that step. Totals and paging each stand in a footer zone of their own, the paging at the trailing edge; the summary row is a labelled total. Italian headings run a third longer and never wrap.',
|
|
1126
1126
|
access: 'A native table named by `tableLabel`, which is required; `th scope="col"`; the record\'s name is the row\'s one link. A sorted column\'s heading carries `aria-sort`. Ours: a missing value is a hidden "—" with screen-reader text, never blank.',
|
|
1127
1127
|
},
|
|
1128
1128
|
{
|
|
@@ -1196,7 +1196,7 @@ export const USAGE = [
|
|
|
1196
1196
|
module: "middle-truncate",
|
|
1197
1197
|
family: "Data",
|
|
1198
1198
|
summary: "A technical string cut in the middle, so its start and its end both stay readable.",
|
|
1199
|
-
when: "“Use Middle Truncate for strings whose head and tail both carry information: file paths (`apps/…/page.tsx`), URLs, deployment IDs (`dpl_…abc123`), commit hashes, branch names with prefixes.” (https://vercel.com/geist/middle-truncate) Ours: an environment variable is one of these too.",
|
|
1199
|
+
when: "“Use Middle Truncate for strings whose head and tail both carry information: file paths (`apps/…/page.tsx`), URLs, deployment IDs (`dpl_…abc123`), commit hashes, branch names with prefixes.” (https://vercel.com/geist/middle-truncate) Ours: an environment variable is one of these too. Inside `@nadicodeai/ui` only, which does not export it: `DataTable`'s `identifier` column, `CodeBlock`'s file name and `TextWithCopyButton`'s `ellipsis` draw it.",
|
|
1200
1200
|
instead: "“For prose, descriptions, and headings, use end-truncation with `…` instead; cutting the middle of a sentence destroys meaning.” (https://vercel.com/geist/middle-truncate) “For any truncated value the user might need verbatim, pair with a `Tooltip` showing the full string or a copy-on-click affordance.” (https://vercel.com/geist/middle-truncate) Ours: a value someone may need exactly is `TextWithCopyButton` or sits beside a `CopyButton`; while the middle is cut, the whole value is also the element's `title`.",
|
|
1201
1201
|
behaviour: "“Middle Truncate renders a single ellipsis glyph (`…`) rather than three periods. This keeps monospace values, including environment variable keys, IDs, hashes, and paths, from reserving three character cells for the truncation marker.” (https://vercel.com/geist/middle-truncate) “The component listens to its container width, so layouts that change width on hover (expanding cards, animated rows) cause the truncation point to jitter. Lock the width during interaction.” (https://vercel.com/geist/middle-truncate) “Copying truncated text yields the full original string from the underlying value, not the visible ellipsis form. Confirm this stays true if wrapping with custom `onCopy`.” (https://vercel.com/geist/middle-truncate) “Don’t wrap Middle Truncate in another `text-overflow: ellipsis` container; the two strategies fight each other and the inner ellipsis wins inconsistently.” (https://vercel.com/geist/middle-truncate) “Keep the visible string long enough on small viewports that the head still identifies the resource (path segment, ID prefix).” (https://vercel.com/geist/middle-truncate) Ours: it fills the width its parent gives and shows the whole value when it fits. Too narrow, the last third of the value, at most 16 characters, stays whole. While the middle is cut, copying a selection made inside it puts the whole value on the clipboard; a value shown in full copies only what is selected. A custom `onCopy` runs first, and `preventDefault` in it keeps the value as selected.",
|
|
1202
1202
|
words: "Ours: the value as the system writes it, unchanged; the ellipsis comes from the layout, never from the text.",
|
|
@@ -1274,7 +1274,7 @@ export const USAGE = [
|
|
|
1274
1274
|
family: "Data",
|
|
1275
1275
|
summary: "Read-only facts about one object, framed as a card with a title, a line, the facts and a footer.",
|
|
1276
1276
|
when: "Read-only facts about one object: who it is, where it belongs, its identifiers; and a status, a read-only card whose `action` is the one action that fixes it. `SettingsFactsSection` frames them as a card; `ObjectFacts` is the list alone.",
|
|
1277
|
-
instead: "Facts a person changes are a `SettingsSection` with its own Save. One server-given value, an ID, is a `SettingsSection` with the value
|
|
1277
|
+
instead: "Facts a person changes are a `SettingsSection` with its own Save. One server-given value, an ID, is a `SettingsSection` with the value as a `TextWithCopyButton`, no Save. Facts compared across records are a table. A relation is its identity or a `Tag`, never its own card.",
|
|
1278
1278
|
behaviour: "\"Use `<Description>` for definition-list metadata: a short Title Case key paired with a single value (`Last Deployed`, `Region`, `Plan`).\" (https://vercel.com/geist/description) Ours: required: the description and the footer's left line (`footerHint`), as on a `SettingsSection`. Two places take a control, each for one job: `actions` at the header's end are the commands on the facts, the Edit that opens their editor, drawn as every card's header draws them (`CardActions`); `action` at the footer's right, beside its line, is the one action the card's state asks for, as a status card's fix (Update, Start) and every Vercel settings card's button stand there. Facts are plain pairs, the label above its value, in two equal columns from 640 px (`sm`) and one column below it. Every label stays when its value is missing, as *—*. A long value spans both columns. No fact gets a box of its own. While the facts are read (`loading`) each label stands over a placeholder line, never a dash, and a read that `failed` puts its message and Try again in their place, inside the card. A `picture` stands beside the facts, as Vercel's deployment card keeps its screenshot, only where DESIGN.md admits a picture on a populated page. In a side column, `presentation=\"summary\"` drops the card, the description and the footer line.",
|
|
1279
1279
|
words: '"Title slot is Title Case noun (`Last Deployed`, `Build Duration`); content is sentence case unless the value is a literal identifier, ID, or timestamp that should be preserved verbatim." (https://vercel.com/geist/description) Ours: labels are nouns in sentence case, no colon: *VAT number*. Identifiers in mono with a copy button, dates in the person\'s locale. The footer line says what the facts are for or links to the docs.',
|
|
1280
1280
|
access: '"Geist renders `<dl>`/`<dt>`/`<dd>` so screen readers announce each key/value pair as a definition." (https://vercel.com/geist/description) "Don’t put interactive controls in the title slot." (https://vercel.com/geist/description) Ours: a `dl` of `dt` and `dd`, each value named by its label. The section is labelled by its heading, which also takes focus when an editor closes. A dash carries screen-reader text.',
|
|
@@ -1319,8 +1319,8 @@ export const USAGE = [
|
|
|
1319
1319
|
summary: "One cell's value in a table, in each state a reading can be in.",
|
|
1320
1320
|
when: "Every cell of a `DataTable` whose reading can be missing, zero, out of date, unreadable or still loading.",
|
|
1321
1321
|
instead: 'A whole table that failed to read is `EmptyState kind="failed"`; a figure on its own is a `KpiCard`.',
|
|
1322
|
-
behaviour: '“Render `—` in cells where a value is unknown or not applicable. Don’t substitute `N/A`, `null`, or an empty string.” (https://vercel.com/geist/table) Ours: five states that never collapse into a dash: unknown (a muted dash), zero (the figure "0"), stale (the reading, then the stale word), failed (the error mark and its words, in the error colour) and loading (a still 64 × 12 placeholder). A real value, `0` included, is shown as it is.',
|
|
1323
|
-
words: 'Ours: `missingLabel` says what the absence means ("Not reported", never "N/A" or "None"); `staleLabel` is one word ("Stale"); `failedLabel` says the read failed ("Couldn\'t read").',
|
|
1322
|
+
behaviour: '“Render `—` in cells where a value is unknown or not applicable. Don’t substitute `N/A`, `null`, or an empty string.” (https://vercel.com/geist/table) Ours: five states that never collapse into a dash: unknown (a muted dash), zero (the figure "0"), stale (the reading, then the stale word), failed (the error mark and its words, in the error colour) and loading (a still 64 × 12 placeholder). A real value, `0` included, is shown as it is. A missing permission and a setup the person can complete are not unknown either: each keeps its own visible state, never a dash.',
|
|
1323
|
+
words: 'Ours: `missingLabel` says what the absence means ("Not reported", never "N/A" or "None"). An absent report is not "None": "None" is a value, only for a complete report that found nothing; `staleLabel` is one word ("Stale"); `failedLabel` says the read failed ("Couldn\'t read").',
|
|
1324
1324
|
access: "The dash is hidden and `missingLabel` is read in its place; the error mark is hidden beside its words; the placeholder is decorative, and its cell is `aria-busy` while it loads.",
|
|
1325
1325
|
},
|
|
1326
1326
|
{
|
|
@@ -1361,7 +1361,7 @@ export const USAGE = [
|
|
|
1361
1361
|
module: "empty-state",
|
|
1362
1362
|
family: "Feedback",
|
|
1363
1363
|
summary: "What a place with nothing in it says, by its cause: never created, empty at the moment, nothing matched, finished, not allowed, or failed to load.",
|
|
1364
|
-
when: '"Fill spaces when no content has been added yet, or is temporarily empty due to the nature of the feature and should be designed to prevent confusion." (https://vercel.com/geist/empty-state) "A card used to communicate an error state with a title and message." (https://vercel.com/geist/error-card) "Pick the variant by what the user needs: no-results for a filtered list that returned zero rows, blank slate or informational for a resource the user hasn’t created, cleared for completed work, permission for role or tier denials, error for a failed load." (https://vercel.com/geist/empty-state) "Render the permission and tier-denial variants full-page when the user lands on a route they can’t view. Use a `Note` only when one tile inside an otherwise-accessible page is gated." (https://vercel.com/geist/empty-state) "Use the Error component as a block surface when a section or page-level resource failed to load: a panel, a dashboard card, a route boundary." (https://vercel.com/geist/error) Ours:
|
|
1364
|
+
when: '"Fill spaces when no content has been added yet, or is temporarily empty due to the nature of the feature and should be designed to prevent confusion." (https://vercel.com/geist/empty-state) "A card used to communicate an error state with a title and message." (https://vercel.com/geist/error-card) "Pick the variant by what the user needs: no-results for a filtered list that returned zero rows, blank slate or informational for a resource the user hasn’t created, cleared for completed work, permission for role or tier denials, error for a failed load." (https://vercel.com/geist/empty-state) "Render the permission and tier-denial variants full-page when the user lands on a route they can’t view. Use a `Note` only when one tile inside an otherwise-accessible page is gated." (https://vercel.com/geist/empty-state) "Use the Error component as a block surface when a section or page-level resource failed to load: a panel, a dashboard card, a route boundary." (https://vercel.com/geist/error) Ours: it is the one owner of an absence in every product: nothing else draws one, and it has no presentation option, so each kind looks the same everywhere. A composition takes its absence as a prop (`empty`, `noMatch` or `failed`), as `DataTable` takes `empty`. Pick the `kind` by the cause. `firstUse` is the blank slate and the informational variant: no record was ever made. `nothingYet`: empty now and it fills by itself. `noResults`: the search or filter found nothing. `cleared`: the work is done. `denied`: this viewer\'s role or plan does not open it. `failed`: the read failed; it is the Error and the Error Card, a failure inside a card with `scope="card"` and one that stands alone as a block with `page` or `region`. There is no educational kind.',
|
|
1365
1365
|
instead: '"Don’t put critical persistent warnings here. Empty states vanish when the list populates; persistent warnings belong in `Note` or the page header." (https://vercel.com/geist/empty-state) "Pick `toasts.error()` for transient action failures (`Couldn’t save settings. Try again.`) and the `error` prop on `Input` for field-level validation. Don’t replace either with this block." (https://vercel.com/geist/error) Ours: `Note` is `MessageNotice` or `NoticeBanner`, `toasts.error()` is `showMessageToast` with the tone `error`, and the `error` prop on `Input` is `FieldError`. Rows still loading are skeleton rows. A failure of one record\'s action is that record\'s row message. One gated tile on an open page is a `MessageNotice`, so `denied` takes `page` or `region`, never `card`.',
|
|
1366
1366
|
behaviour: '"The CTA must be a real `Button` or `Link`, not an `onClick` div, so it joins the tab order and exposes a role." (https://vercel.com/geist/empty-state) "Cap at one primary CTA, plus one secondary when the first action could legitimately be one of two paths (`Import Repository` and `Deploy Template`). Three CTAs is a smell." (https://vercel.com/geist/empty-state) "Don’t auto-launch a tour from the educational variant; pair `Start Tour` with `Skip`." (https://vercel.com/geist/empty-state) "The recovery action must do something concrete: a `Try Again` button when the operation is retry-safe, a named verb (`Reconnect GitHub`, `Update Payment Method`) when it isn’t." (https://vercel.com/geist/error) "Don’t auto-retry in the background; the user came to this surface to decide." (https://vercel.com/geist/error) "For full-page route errors (`error.tsx`), return focus to the `Try Again` button on appearance so a keyboard user can retry without hunting for it." (https://vercel.com/geist/error) "Always pair platform or system errors with a stable identifier (request ID `x-vercel-id`, deployment ID `dpl_…`, run ID, trace ID). Validation and permission denials are user-state, not system, and don’t need an ID." (https://vercel.com/geist/error) "Render the stable ID on a monospace sub-line under a collapsed `<details>` so the user can copy-paste it into a support thread." (https://vercel.com/geist/error) Ours: `firstUse` has the one picture, one action and at most one docs link under it; there is no educational kind, so no tour. A failure shows at most two of its message\'s actions, Retry first, and moves focus to the first one when it fills a page (`scope="page"`); its `reference` is the collapsed Disclosure holding the monospace identifier and a copy button. A page or a region stands on a resting card, inside a card it takes none, and a collection always passes `card`; a card that lists a few items, as a collection\'s rail does, passes `line`, where `nothingYet` and `cleared` are one 44 px row like an item: the message at the left, after the cleared check at 16 px. Every kind that carries a title, `failed` excepted, draws it the same way: a mark or picture, a 16 px medium title, one or two muted 14 px lines, 24 px apart, centred, the lines no wider than 340 px. `cleared` and `denied` carry a bordered 54 px tile with a muted icon, never a hue; the picture is `firstUse`\'s alone. The action is the filled primary button, as Vercel\'s Connect draws Create Connector in its empty card; the docs link is muted. A page or a region is padded 48 px above and below and 70 px at the sides (a first use narrows to 24 px under 640 px for its picture). `failed` is the one hued kind: on a page or a region its ground, line, mark and text are all in the error colour, with a 16 px regular title, 16 px padding and 8 px between its parts, and the buttons stay neutral; inside a card it takes the text and mark colour alone, because the card owns the edge and a second one would double it. A first use\'s picture is 240 × 176 px on a page and 200 × 144 px in a region or a card. Required: `firstUse` and `denied` take a title and a line, `firstUse` its picture, `failed` the catalogue message whose title is always drawn.',
|
|
1367
1367
|
words: '"`title` is Title Case (`No Logs Match Your Filter`); `description` is sentence case and adds new information instead of restating the title." (https://vercel.com/geist/empty-state) Ours: a title is sentence case and names what is missing ("No mailboxes yet"), not Title Case; a quiet line is one sentence. "Quote a single typed query verbatim with curly quotes: `No logs match “${query}”. Clear the filter to see all logs.` For multi-facet filters use the plural template `No {Items} Match Your Filters` and suggest widening or clearing." (https://vercel.com/geist/empty-state) "Onboarding bodies name the next action that creates the first item: `Push to your Git repository to create your first one.` Tier-gated bodies follow `{Feature value} with the {Plan} plan.`" (https://vercel.com/geist/empty-state) "Error variant pairs the body with a copyable request ID and a `Try Again` button." (https://vercel.com/geist/empty-state) "CTA labels are Title Case `Verb + Noun`. Never `Get Started`, `Continue`, or `OK`." (https://vercel.com/geist/empty-state) Ours: an action label is sentence case, verb and noun ("Clear filters", "New Agent"), never "Get started" or "OK". "State what happened and what to do next, in that order. Cut apologetic preambles (`Unfortunately`, `Oops`, `We’re sorry`)." (https://vercel.com/geist/error) "Use `Couldn’t` or `Can’t` for user-state errors (`Couldn’t verify your passkey. Try again.`); use `Failed to` for system or infra errors that mirror CLI output (`Build failed. Bundle exceeds 50 MB.`). `Unable to` is banned." (https://vercel.com/geist/error) "Don’t fall back to `Something Went Wrong` as a title; name the resource that failed (`Couldn’t Load Page`, `Couldn’t Load Deployments`)." (https://vercel.com/geist/error) "Never humor an error. Users hitting an error are frustrated; insincere copy makes it worse." (https://vercel.com/geist/error) Ours: a failure is the catalogue\'s message, never a string of the component\'s own, and its title names what failed to load.',
|
|
@@ -1394,7 +1394,7 @@ export const USAGE = [
|
|
|
1394
1394
|
module: "hover-card",
|
|
1395
1395
|
family: "Feedback",
|
|
1396
1396
|
summary: "A card of a few facts about something named in a dense row, shown on hover or focus.",
|
|
1397
|
-
when: '"Use Context Card to reveal entity metadata on hover or focus: a user, a deployment, a project, an API key." "The trigger is usually a name link or avatar in dense data." (https://vercel.com/geist/context-card) Ours: `Context Card` is `HoverCard
|
|
1397
|
+
when: '"Use Context Card to reveal entity metadata on hover or focus: a user, a deployment, a project, an API key." "The trigger is usually a name link or avatar in dense data." (https://vercel.com/geist/context-card) Ours: `Context Card` is `HoverCard`, inside `@nadicodeai/ui` only, which does not export it: `RecordTime` draws it. The exact moment behind a relative time is also a card. An entity\'s card is a `HoverCardSummary`.',
|
|
1398
1398
|
instead: '"For a one-line "why" without metadata rows, use `Tooltip`." "For long-form content, edit forms, or persistent navigation, route to a `Drawer` or a detail page." "Don’t use Context Card to surface destructive actions; the panel can dismiss on cursor exit before the user commits." "Don’t nest a Context Card inside a Tooltip or another Context Card; the second layer steals focus and traps keyboard users." (https://vercel.com/geist/context-card) Ours: `Drawer` is `Sheet`. A card is never the only way to an action.',
|
|
1399
1399
|
behaviour: '"Context Card opens on hover and keyboard focus and closes on cursor exit or blur." "Preserve the ~150ms entry delay so it doesn’t flash on a fast mouse sweep." "Cap interactive content at one primary action (`View Project`, `Open Settings`)." "More than one CTA reads as a menu and belongs in `Menu`." "Use `align` to position the card at the start, center, or end of the trigger." "Use `render` to set the trigger as a custom element, such as a link, button, or badge." (https://vercel.com/geist/context-card) Ours: the parts are `HoverCard`, `HoverCardTrigger`, `HoverCardContent` and `HoverCardSummary`. The card opens above by default, 150 ms after the pointer or focus arrives (`delay` on `HoverCardTrigger`), stays open while the pointer is on it. `HoverCardContent` requires its facts as children. A `HoverCardSummary` is the entity\'s name, one identifying line, two to four label and value facts, and at most one link, which takes the product\'s router link through `render`. Colour: one neutral surface with no hue; the only accent a card carries is its link, in the outline button.',
|
|
1400
1400
|
words: '"Lead with the entity name as a Title Case heading and one identifying line in sentence case underneath (team slug, owner, deployment URL)." "Follow with 2–4 metadata rows of `Label: value`." "Keys are Title Case noun phrases (`Last Active`, `Created`, `Plan`); values follow the same formatting rules as table cells." "Use the em-dash character `—` for unknown values, never `N/A` or `null`." "Don’t restate what the trigger already showed." "If the row already renders the deployment URL, don’t repeat it as the first card line." (https://vercel.com/geist/context-card) Ours: the name and the keys are in sentence case (*Last active*). A time\'s card leads with the relative label, and its trigger keeps its verb sentence: *Updated 3h ago*.',
|
|
@@ -1417,7 +1417,7 @@ export const USAGE = [
|
|
|
1417
1417
|
family: "Feedback",
|
|
1418
1418
|
summary: "A condition of the page's own object, with the fix the page offers.",
|
|
1419
1419
|
when: '"A prominent message that spans the full width of its container to announce important information." (https://vercel.com/geist/banner) "Used for temporary, project-wide notifications that require resolution" (https://vercel.com/geist/project-banner) "Use Project Banner for project-wide states that need resolution: overdue billing, an active rollback, attack mitigation, an expiring trial blocking deploys." (https://vercel.com/geist/project-banner) "Match `variant` to severity: `error` for critical downtime or payment-blocking states, `warning` for an exceptional state with non-immediate action, `success` for a positive temporary mitigation, `gray` for routine project-wide notices." (https://vercel.com/geist/project-banner) Ours: a condition of the page\'s own object that the page itself resolves, with that resolving action on the banner: a past-due subscription on its billing page, a failed refresh of the page\'s own reading. The `tone` is the `variant`: `destructive` is `error`, `warning` is `warning`, `info` is `success` and `neutral` is `gray`. One sits above the page\'s content, under its title.',
|
|
1420
|
-
instead: '"Pick `Note` for inline contextual messages tied to a single field or card, `Toast` for transient acknowledgments, `Modal` for confirmations." (https://vercel.com/geist/project-banner) Ours: there is no announcement strip. `Note` is `MessageNotice` (`placement="section"`), `Toast` is `showMessageToast` and `Modal` is `ConfirmDialog`. For a measured level use a `KpiCard` with its tone; crossing a threshold is a notification in the inbox, not a banner. A condition of the system, the setup or the staff (a connection, a stored secret, a failing job, anything a staff member fixes in settings) is a notification in the product\'s inbox, never a banner on a page: "The Vercel dashboard displays a popover, which contains all relevant notifications" (https://vercel.com/docs/notifications), and the Portal\'s System health raises it through Knock to the bell at the sidebar\'s foot.',
|
|
1420
|
+
instead: '"Pick `Note` for inline contextual messages tied to a single field or card, `Toast` for transient acknowledgments, `Modal` for confirmations." (https://vercel.com/geist/project-banner) Ours: there is no announcement strip. `Note` is `MessageNotice` (`placement="section"`), `Toast` is `showMessageToast` and `Modal` is `ConfirmDialog`. For a measured level use a `KpiCard` with its tone; crossing a threshold is a notification in the inbox, not a banner. A condition of the system, the setup or the staff (a connection, a stored secret, a failing job, anything a staff member fixes in settings) is a notification in the product\'s inbox, never a banner on a page, and the page that fixes it shows the state in its own section: "The Vercel dashboard displays a popover, which contains all relevant notifications" (https://vercel.com/docs/notifications), and the Portal\'s System health raises it through Knock to the bell at the sidebar\'s foot.',
|
|
1421
1421
|
behaviour: '"Project Banner is non-dismissible by design. If the message can be dismissed without resolving the underlying state, it isn’t banner-worthy; move it to a `Note`." (https://vercel.com/geist/project-banner) "Show one Project Banner at a time. Stacking competing banners drowns the most urgent state." (https://vercel.com/geist/project-banner) "Always pass a `callToAction` that resolves the state. A banner with no route is a dead end." (https://vercel.com/geist/project-banner) Ours: a strip as wide as its container: a filled ground with a line on its top and bottom edge only, no corners, 40 px high and centred, with the mark, the sentence and the fix on one row; under 768 px the fix drops under the sentence, aligned with its text. The title and the description run on as one passage: the title closed by a full stop when it has none of its own, leading in semibold when a description follows and at regular weight alone, the description after it on the same line, and a description that repeats the title not shown. `detail` takes its own row under the passage. Colour sits on the whole strip (ground, both lines, mark and text); the fix is an underlined link in the darkest step of the same hue (neutral: `text-foreground`) and returns to the strip\'s text on hover. Neutral and info take the Info mark, warning and destructive the TriangleAlert. `action` is the `callToAction`: one command, never two, never a ready-made button, and there is no close button. Required: `action`, `title`, `tone` and `liveRegion`; the mark is always drawn, and `icon` swaps the tone\'s mark for another lucide icon.',
|
|
1422
1422
|
words: '"`label` is one sentence in sentence case that names the impact: `Your Pro trial expires in 3 days.` Don’t open with `Heads up` or apologetic preambles." (https://vercel.com/geist/project-banner) "`callToAction.label` is Title Case `Verb + Noun` and points at the resolver: `Update Payment Method`, `Reactivate Project`, `Review Tokens`." (https://vercel.com/geist/project-banner) "Name the affected entity when the project context isn’t obvious from the surrounding chrome (`Production deployments are paused on my-project`)." (https://vercel.com/geist/project-banner) "Don’t encode severity in the copy with emoji or interjections; the variant carries that signal." (https://vercel.com/geist/project-banner) "`NoteLabel` is a 1–2 word Title Case prefix that names the topic: `Region Change`, `Rate Limit`, `Plan Limit`. Cut hedges like `Heads Up`, `FYI`, and `Note`." (https://vercel.com/geist/note) Ours: the `title` is the `label`: the one sentence, naming the condition, its impact and the object. A `description` only adds what the title leaves out, in one more sentence. Our `label` is the `NoteLabel` topic prefix. The action is sentence case, verb and noun, pointing at the resolver: "Update payment method", "Try again". No "Please". The words come from the product\'s catalogue code.',
|
|
1423
1423
|
access: '`liveRegion="assertive"` gives `role="alert"`, for a failure the person just caused; `"polite"` gives `role="status"`, announced once when it appears; `"off"` gives `role="note"` for one already there at load. The mark, given or not, is hidden.',
|
|
@@ -1472,7 +1472,7 @@ export const USAGE = [
|
|
|
1472
1472
|
family: "Feedback",
|
|
1473
1473
|
summary: "A short, optional fact about its trigger.",
|
|
1474
1474
|
when: '"Use a Tooltip to explain **why** something exists, not **what** it is." "The visible label names the thing; the tooltip adds the constraint, scope, or limit." (https://vercel.com/geist/tooltip) "Use lifecycle Tooltips (`Alpha`, `Experimental`, `Beta`, `Early Access`) to name the limits that apply: API stability, SLA, support, pricing, retention." (https://vercel.com/geist/tooltip) Ours: the parts are `TooltipProvider`, `Tooltip`, `TooltipTrigger` and `TooltipContent`. A shortcut is shown in a tooltip only when one is bound.',
|
|
1475
|
-
instead: '"For an entity preview with metadata rows (avatar, identifier, 2–4 facts, optional action), use `Context Card`." "For long-form content or actions that need persistence, route to a `Drawer` or page navigation." (https://vercel.com/geist/tooltip) Ours: `Context Card` is `HoverCard` and `Drawer` is `Sheet`.
|
|
1475
|
+
instead: '"For an entity preview with metadata rows (avatar, identifier, 2–4 facts, optional action), use `Context Card`." "For long-form content or actions that need persistence, route to a `Drawer` or page navigation." (https://vercel.com/geist/tooltip) Ours: `Context Card` is `HoverCard`, which only this package\'s components draw, such as `RecordTime`, and `Drawer` is `Sheet`. Essential reasons and actions never live only in a hover tooltip: a disabled command\'s reason is written under it.',
|
|
1476
1476
|
behaviour: '"Tooltips open on hover and on keyboard focus." "Keep the default ~150ms entry delay so the tooltip doesn’t flicker on a sweeping mouse." "Don’t wrap a labelled `Input` in a Tooltip." "The trigger lands on the `<label>`, not the field, and the tooltip text becomes a second invisible label for screen readers." "Put help on a sibling icon button." "Keep primary actions outside the Tooltip; touch users can’t reach a hover-revealed control." (https://vercel.com/geist/tooltip) Ours: the pointer wait is 150 ms and keyboard focus opens it at once; `delay={0}` on the trigger or a `TooltipProvider` removes the wait. Above by default, 10 px from the trigger, at most 250 px wide, 13 px text balanced over its lines. Never interactive. `arrow={false}` drops the stem (Geist\'s `tip={false}`); `centerText={false}` left-aligns a tooltip that wraps (Geist\'s `center={false}`). Geist\'s coloured `type` is not provided. `TooltipContent` requires its text as children, one string, so no control, link or second overlay fits inside it. Colour: one inverted neutral, the page\'s ink as the fill and its surface as the text, with a stem of the same fill and no hue, in both themes; a shortcut is `shortcut`, the `Kbd`\'s props, drawn as a `Kbd` after the text, 20 px high.',
|
|
1477
1477
|
words: '"One sentence or fragment in `text`." "Sentence case, no period for a single fragment." "Skip tooltips that repeat the visible label (`text="Rate Limit"` on a `Rate Limit` button) or describe the interaction (`text="Click to override"`)." "Lifecycle Tooltips follow `{Label}: {one-line meaning}. {Specific limit}.`" "For a paid Beta feature, combine the lifecycle and pricing in one Tooltip rather than stacking two badges." (https://vercel.com/geist/tooltip) Ours: the text is `TooltipContent`\'s children, for example *Resets on 1 November*.',
|
|
1478
1478
|
access: '"An icon-only trigger needs an `aria-label` that names the action; the Tooltip body adds context, it doesn’t replace the label." "Escape closes the tooltip and returns focus to the trigger." (https://vercel.com/geist/tooltip)',
|
|
@@ -1493,11 +1493,11 @@ export const USAGE = [
|
|
|
1493
1493
|
module: "waiting-line",
|
|
1494
1494
|
family: "Feedback",
|
|
1495
1495
|
summary: "The one moving thing a system wait may show: a 2 px ink line, after a second.",
|
|
1496
|
-
when: "A system wait the person asked for that runs past a second: a save, a connection, a download without a count. In a record's row, `WaitingDetail` puts it under the row's detail line, which names the work.",
|
|
1496
|
+
when: "A system wait the person asked for that runs past a second: a save, a connection, a download without a count. In a record's row, `WaitingDetail` puts it under the row's detail line, which names the work, and the row shows no status badge for the same wait. One wait gets one indicator.",
|
|
1497
1497
|
instead: "Under a second the `PendingLabel` alone. A known amount is a progress line with a count. A page load is `Skeleton`. An Agent working is her orb and a sentence.",
|
|
1498
1498
|
behaviour: "Takes its 2 px from the start and stays empty until 1 s, so its arrival moves nothing. It is mounted with the control or region it waits for and told `waiting`, never mounted on a condition: a line that mounts with the wait adds its height and its gap to the layout (lint: nadicodeai/waiting-line-stays-mounted). In a footer it sits on the footer's edge, out of the flow (`absolute inset-x-0 top-0` in a `relative` footer). No track colour; the segment is ink, never info blue, crossing at 32% width. Under reduced motion it breathes in opacity, across the whole track, instead of travelling.",
|
|
1499
1499
|
words: "None of its own. The control beside it carries the pending word; a standalone line takes a `label` naming the work: *Connecting Telegram*.",
|
|
1500
|
-
access: 'With a label: `role="status"`, announced once after the second. `decorative` when a control or sentence beside it already names the work
|
|
1500
|
+
access: 'With a label: `role="status"`, announced once after the second. `decorative` when a control or sentence beside it already names the work. The segment is hidden.',
|
|
1501
1501
|
},
|
|
1502
1502
|
{
|
|
1503
1503
|
name: "AccountMenu",
|
|
@@ -1527,7 +1527,7 @@ export const USAGE = [
|
|
|
1527
1527
|
family: "Menus",
|
|
1528
1528
|
summary: "A record's three dots: the menu of its secondary commands, headed by the record's name.",
|
|
1529
1529
|
when: '"An overflow menu triggered by a three-dot icon that reveals additional actions in a dropdown." (https://vercel.com/geist/dots-menu) "Use Menu for a discoverable trigger that opens a list of actions on a single resource (a dots menu on a row, a dropdown on a primary entity)." (https://vercel.com/geist/menu) Ours: the secondary commands of one record from a visible trigger: the row\'s three dots, or the page\'s, which comes last in the title row. A record\'s one main task is a visible button beside the dots; one non-destructive command that can run, alone, is drawn as a button by `RecordList` and `PageActions`, never as a menu; one that cannot run or is locked stays in the menu so its reason is read.',
|
|
1530
|
-
instead:
|
|
1530
|
+
instead: "\"For right-click or long-press on a row, use `ContextMenu`. For global commands behind `⌘K`, use `CommandMenu`. For two related primary actions, use a split button rather than burying the secondary action.\" (https://vercel.com/geist/menu) Ours: for a record's main task use a visible button (Edit opens the row). A record's way to its own page is its visible name or a labelled link, never a command in this menu. For finding across everything use `CommandDialog`. For a value to choose use `Select`. For right-click use the mirror, `ActionContextMenu`.",
|
|
1531
1531
|
behaviour: '"Open on click, not hover; hover-open menus collide with screen readers and trackpad scrolls." (https://vercel.com/geist/menu) "Position auto-flips based on window bounds; don’t hardcode a side that clips on narrow viewports." (https://vercel.com/geist/menu) "Close on item activation, Escape, and outside-click. Don’t auto-close on a hover-out." (https://vercel.com/geist/menu) "Use `MenuItemLocked` for permission-gated actions so the lock icon and disabled state explain why the row is inert." (https://vercel.com/geist/menu) Ours: that is `locked` with its `reason`, which is required: the row stays in place, inert, with a lock at its end and the reason under its label. The menu is at most 288 px wide, as the account menu is, and the record\'s name heading it is one line, cut with an ellipsis and whole in its tooltip, so a long record, a memory or a sentence, never widens it. The trigger is a ghost icon button at `{spacing.control-height}` (36 px) wherever it stands, named for its record ("More for pec@acme.it"), and comes last, after any button; it keeps its fill while open. The menu opens 10 px under the trigger, aligned to its end: the record\'s name, the commands with their icons first and the value one acts on in mono under it, then the destructive ones after a divider in the error colour. A command that cannot run now takes `disabledReason`: it stays in place, 36 px like the rest, with its text muted, never dimmed, and says why in a line under its label; a destructive one is muted, not red; a running one takes `pending` and `pendingLabel`. Nothing renders with no command.',
|
|
1532
1532
|
words: '"Item children are Title Case `Verb + Noun` (`Rename Project`, `Duplicate Deployment`). Bare verbs like `Rename` or `Edit` are wrong outside obvious single-object context." (https://vercel.com/geist/menu) "End an item with `…` only when activating it opens a follow-up dialog (`Rename…`, `Transfer to Team…`)." (https://vercel.com/geist/menu) "Group destructive items at the bottom, separated by a divider, and keep the destructive copy as `Verb + Noun` (`Delete Project`, never bare `Delete`)." (https://vercel.com/geist/menu) "Cap a Menu around 10 items. Past that, group with `MenuSection` or move secondary actions to a settings page." (https://vercel.com/geist/menu) Ours: sentence case, "Remove mailbox", not Title Case. The trigger reads "More for {record}"; the header is the record\'s name. Rows wrap, never truncate.',
|
|
1533
1533
|
access: '"Typeahead jumps to the next item whose label starts with the typed character; keep the visible label first so typeahead matches what the user sees." (https://vercel.com/geist/menu) "Return focus to the trigger on close so keyboard users keep their place in the row." (https://vercel.com/geist/menu) Ours: the trigger is a ghost icon button named by `label`, which is required, `aria-expanded` while open. `role="menu"`, items `menuitem` in a group named by `record`, which is required; every command requires its `icon`. The value a command acts on and its reason are the item\'s description; icons hidden.',
|
|
@@ -1548,7 +1548,7 @@ export const USAGE = [
|
|
|
1548
1548
|
module: "context-menu",
|
|
1549
1549
|
family: "Menus",
|
|
1550
1550
|
summary: "A menu that opens at the pointer on a right-click or a long press, from the dropdown's own parts.",
|
|
1551
|
-
when: '"Use ContextMenu for power-user shortcuts on right-click or long-press over a row, file, or canvas object." (https://vercel.com/geist/context-menu) "ContextMenu must never be the only entry point for an action. Mirror every item in a visible `Menu` trigger or row button so mouse-only and keyboard-only users have parity." (https://vercel.com/geist/context-menu) Ours: a right-click on a canvas or a surface no record owns, whose commands are also reachable another way.',
|
|
1551
|
+
when: '"Use ContextMenu for power-user shortcuts on right-click or long-press over a row, file, or canvas object." (https://vercel.com/geist/context-menu) "ContextMenu must never be the only entry point for an action. Mirror every item in a visible `Menu` trigger or row button so mouse-only and keyboard-only users have parity." (https://vercel.com/geist/context-menu) Ours: inside `@nadicodeai/ui` only, which does not export it: `ActionContextMenu` draws it for a record. A right-click on a canvas or a surface no record owns, whose commands are also reachable another way, is a composition built on it in this package.',
|
|
1552
1552
|
instead: '"For a global command palette, use `CommandMenu`; for a dropdown opened from a visible trigger, use `Menu`." (https://vercel.com/geist/context-menu) Ours: those are `CommandDialog` and `DropdownMenu`. A record\'s right-click is `ActionContextMenu`, from the same data as its `ActionMenu`.',
|
|
1553
1553
|
behaviour: '"Bind to right-click on desktop and long-press on touch. Suppress the native browser menu only on the trigger area, not the whole page." (https://vercel.com/geist/context-menu) "Position the menu at the pointer; if it would overflow the viewport, flip horizontally then vertically before clipping." (https://vercel.com/geist/context-menu) "Close on activation, Escape, and outside-click. Don’t close on hover-out." (https://vercel.com/geist/context-menu) Ours: the dropdown\'s surface and rows exactly, 160 px wide at least, opening 2 px right of the pointer and appearing at once, with no entry motion. A row that cannot be chosen keeps its place with its text muted, never dimmed. Destructive last, after a divider.',
|
|
1554
1554
|
words: '"Items follow the same rules as `Menu`: Title Case `Verb + Noun` (`Open in New Tab`, `Copy URL`, `Delete Deployment`). Bare verbs are wrong." (https://vercel.com/geist/context-menu) "End with `…` only when activating opens a follow-up dialog (`Rename…`, `Move to Folder…`)." (https://vercel.com/geist/context-menu) "Group destructive items at the bottom with a divider and keep the destructive label `Verb + Noun`. `Delete` alone never ships." (https://vercel.com/geist/context-menu) Ours: sentence case, "Copy address", not Title Case. Identical to the visible menu\'s, in the same order; a command reached two ways reads the same both ways.',
|
|
@@ -1561,7 +1561,7 @@ export const USAGE = [
|
|
|
1561
1561
|
summary: "A modal for a bounded job the person finishes or cancels.",
|
|
1562
1562
|
when: '"Use Modal when a decision must block the rest of the page. For persistent associated context where the underlying page stays readable, use `Sheet` on desktop or `Drawer` on mobile." (https://vercel.com/geist/modal) "Skip Modal for routine create flows that have a dedicated page; route to the page instead." (https://vercel.com/geist/modal) Ours: `Dialog` is Geist\'s Modal, usually reached through `FormDialog`: a new record through a few fields, or one or two values changed from a command.',
|
|
1563
1563
|
instead: '"Confirm destructive actions in a Modal. `Drawer` and `Sheet` don’t fully dim the page, so they read as too soft for a delete or revoke." (https://vercel.com/geist/modal) Ours: a consequence is `ConfirmDialog`. A catalogue or a setup in steps is `FormDrawer`. A record that already has a page, or a linkable workflow, is that page.',
|
|
1564
|
-
behaviour: '"Allow Escape and outside-click to dismiss non-destructive Modals; gate dismissal on destructive ones with unsaved input." (https://vercel.com/geist/modal) Ours: centred over a scrim, 540 px wide with 20 px of padding; on a phone it is a bottom sheet (`phoneLayout="centred"` keeps it centred). The title, its optional description and the fields scroll and the footer stays at the bottom; with `sticky` the header stays too, as a recessed bar. The footer is recessed and holds 32 px buttons in one row, also on a phone: Cancel at the leading edge, the primary at the trailing edge, a lone button across the full width. A step back (*Previous*) is wrapped with Cancel in one group at the leading edge, so the footer keeps two ends. A footer always holds an action: `children`, or `showCloseButton` with its `closeLabel`. All neutral: the footer and a `sticky` header are recessed behind a hairline, and no hue appears but the focus ring.',
|
|
1564
|
+
behaviour: '"Allow Escape and outside-click to dismiss non-destructive Modals; gate dismissal on destructive ones with unsaved input." (https://vercel.com/geist/modal) Ours: centred over a scrim, 540 px wide with 20 px of padding; on a phone it is a bottom sheet (`phoneLayout="centred"` keeps it centred). The title, its optional description and the fields scroll and the footer stays at the bottom; with `sticky` the header stays too, as a recessed bar. The footer is recessed and holds 32 px buttons in one row, also on a phone: Cancel at the leading edge, the primary at the trailing edge, a lone button across the full width. A step back (*Previous*) is wrapped with Cancel in one group at the leading edge, so the footer keeps two ends. A footer always holds an action: `children`, or `showCloseButton` with its `closeLabel`. A choice to stop being asked is a checkbox at the end of the body, remembered by whichever action is taken, never a third button in the footer. All neutral: the footer and a `sticky` header are recessed behind a hairline, and no hue appears but the focus ring.',
|
|
1565
1565
|
words: '"`Modal.Title` is a Title Case statement, never a question. `Transfer Project` is correct; `Transfer Project?` is wrong." (https://vercel.com/geist/modal) "`Modal.P` body is sentence case, 1–3 sentences. State the consequence first, then any cascade." (https://vercel.com/geist/modal) "Primary button is `Verb + Noun` and matches the title verb (`Transfer Project` title pairs with `Transfer Project` button). Never `Confirm`, `OK`, or a bare verb on a destructive primary." (https://vercel.com/geist/modal) "Cancel literal stays `Cancel`. Acknowledgment-only Modals (after a key reveal, after a one-time-show) use `Done`, never `OK` or `Close`." (https://vercel.com/geist/modal) "Pair the success toast verb 1:1 with the primary button: `Delete Project` button, `Project deleted` toast." (https://vercel.com/geist/modal) Ours: titles and buttons are sentence case where Geist writes Title Case: the title *Add MCP server*, the primary *Add server*, and its pending word is its -ing form. The failure comes from the catalogue, above the footer. The description is optional and runs to two lines.',
|
|
1566
1566
|
access: '"Set `aria-labelledby` to the `Modal.Title` id so screen readers announce the title on open." (https://vercel.com/geist/modal) "Keep the Cancel button literally `Cancel` so screen-reader users hear a stable dismissal label across destructive flows." (https://vercel.com/geist/modal) "Trap focus inside the Modal while it’s open and return focus to the trigger after close. Restore body scroll on the same tick the Modal unmounts." (https://vercel.com/geist/modal) "After an error inside the Modal, keep focus inside so the user can retry; after success, return focus to the trigger." (https://vercel.com/geist/modal) Ours: `role="dialog"` named by its title. The corner Close is named by `closeLabel`. Focus starts on the first field or `initialFocus`.',
|
|
1567
1567
|
},
|
|
@@ -1581,7 +1581,7 @@ export const USAGE = [
|
|
|
1581
1581
|
module: "dropdown-menu",
|
|
1582
1582
|
family: "Menus",
|
|
1583
1583
|
summary: "A menu that floats from a visible trigger, built from its parts: the surface, labelled groups, commands, links, choices and dividers.",
|
|
1584
|
-
when: '"Use Menu for a discoverable trigger that opens a list of actions on a single resource (a dots menu on a row, a dropdown on a primary entity)." (https://vercel.com/geist/menu) Ours: a menu no composition draws: a column chooser, a sort, a product\'s own choices in a submenu.',
|
|
1584
|
+
when: '"Use Menu for a discoverable trigger that opens a list of actions on a single resource (a dots menu on a row, a dropdown on a primary entity)." (https://vercel.com/geist/menu) Ours: inside `@nadicodeai/ui` only, which does not export it, a menu no composition draws: a column chooser, a sort, a product\'s own choices in a submenu.',
|
|
1585
1585
|
instead: "\"For right-click or long-press on a row, use `ContextMenu`. For global commands behind `⌘K`, use `CommandMenu`. For two related primary actions, use a split button rather than burying the secondary action.\" (https://vercel.com/geist/menu) Ours: those are `ContextMenu` and `CommandDialog`; two related primary actions stand side by side as buttons. A record's or a page's commands are `ActionMenu` or `PageActions`' menu, from data. The account's rows are `AccountMenu`. These four draw their rows with `DropdownMenuCommand`; the `DropdownMenu` family is used directly only for a choice menu such as a sort, with `DropdownMenuLink` for a destination row. A value to choose in a form is `Select`.",
|
|
1586
1586
|
behaviour: '"Dropdown menu opened via button. Supports typeahead and keyboard navigation." (https://vercel.com/geist/menu) "Open on click, not hover; hover-open menus collide with screen readers and trackpad scrolls." (https://vercel.com/geist/menu) "Position auto-flips based on window bounds; don’t hardcode a side that clips on narrow viewports." (https://vercel.com/geist/menu) "Close on item activation, Escape, and outside-click. Don’t auto-close on a hover-out." (https://vercel.com/geist/menu) "Use `MenuItemLocked` for permission-gated actions so the lock icon and disabled state explain why the row is inert." (https://vercel.com/geist/menu) Ours: that is `locked` with its `reason`. A solid floating surface, 200 px wide at least, 10 px from its trigger. A labelled trigger may end in a chevron; an icon trigger has none. Safe commands come first, each with its icon, groups split by a divider, the destructive command last. Colour sits on that command alone: its text is the error colour at rest and its row takes the soft error fill when highlighted; the panel, the other rows, a section title and the divider stay neutral, and a suffix or lock is muted, 12 px after the label. A command that cannot run stays in place with muted text, never dimmed, and says why in a muted line under its label, which a tap on a phone reads as well as a pointer, since a tooltip opens for the mouse only; a destructive one is muted, not red. Every row, of any kind, is 36 px in the default comfortable density (44 on touch; the compact density, `density="compact"`, tightens the padding to about 28 px on a fine pointer, and no menu in the product uses it) with `{rounded.sm}` corners and the pointer cursor, or the default one when it cannot be chosen, a row with a reason growing by its line, and a section title is a muted row of that height. The highlight is the row\'s fill alone: no text inside a row changes colour with it, and a row that cannot be chosen takes no highlight. A submenu goes one level deep at most (`one-submenu-level`), and never holds a destructive command.',
|
|
1587
1587
|
words: '"Item children are Title Case `Verb + Noun` (`Rename Project`, `Duplicate Deployment`). Bare verbs like `Rename` or `Edit` are wrong outside obvious single-object context." (https://vercel.com/geist/menu) "End an item with `…` only when activating it opens a follow-up dialog (`Rename…`, `Transfer to Team…`)." (https://vercel.com/geist/menu) "Group destructive items at the bottom, separated by a divider, and keep the destructive copy as `Verb + Noun` (`Delete Project`, never bare `Delete`)." (https://vercel.com/geist/menu) "Section headers (`MenuSection title`) are Title Case, 1–2 words (`Workspace`, `Recent Projects`)." (https://vercel.com/geist/menu) "Cap a Menu around 10 items. Past that, group with `MenuSection` or move secondary actions to a settings page." (https://vercel.com/geist/menu) Ours: sentence case, not Title Case: "Remove mailbox", never a bare "Delete"; a section title is sentence case too. Italian runs a third longer; rows wrap, never truncate.',
|
|
@@ -1615,7 +1615,7 @@ export const USAGE = [
|
|
|
1615
1615
|
family: "Menus",
|
|
1616
1616
|
summary: "A small control set tied to its trigger, on a solid floating surface.",
|
|
1617
1617
|
when: "A small control set tied to its trigger: filters, a scope chooser, a date range, a feedback form. The page stays live behind it.",
|
|
1618
|
-
instead: '
|
|
1618
|
+
instead: "A record's commands are its `ActionMenu`, a page's are `PageActions`' `menu`. For a form that adds a record use `FormDialog`. For one phrase use `Tooltip`; facts on hover are a `HoverCard`, which only this package's components draw, such as `RecordTime`. The product-design skill's patterns.md, \"Choose the surface for a change\", decides which surface a job takes.",
|
|
1619
1619
|
behaviour: "Solid floating surface, 12 px padding and gap. Opens on click, closes on Escape or outside press, focus returns to the trigger. A control set applies at once, with no Save inside; a feedback form is the exception: its button sends it, it shows its pending and result state, and it keeps what was typed when sending fails.",
|
|
1620
1620
|
words: "Title names the control's job (*Filter skills*); an optional one-line description. Options are nouns.",
|
|
1621
1621
|
access: "Trigger has a visible name and `aria-expanded`. The popup is a labelled dialog that does not trap focus; Tab leaves it in order. Nothing essential shows only on hover: what a person needs to read stays visible in the trigger or the page, never only in the popup's hover state.",
|
|
@@ -1660,7 +1660,7 @@ export const USAGE = [
|
|
|
1660
1660
|
summary: "On which days activity happened, as a year of cells.",
|
|
1661
1661
|
when: "On which measured days activity happened, over the window the data covers, up to the last 365 days.",
|
|
1662
1662
|
instead: "Never added to fill a row. Amounts over time are a bar or area chart. It follows the selected metric and names its own from-to window.",
|
|
1663
|
-
behaviour: "One hue, chart-1, at four steps of opacity over an empty day; a legend from Less to More. Only measured history: unknown coverage stays unknown, never zero. Its card spans the row
|
|
1663
|
+
behaviour: "One hue, chart-1, at four steps of opacity over an empty day; a legend from Less to More. Only measured history: unknown coverage stays unknown, never zero. Its card stands beside one sibling card from `lg` when the page has one, and spans the row alone otherwise; a window of a quarter or less draws larger cells, so 30 days is never a thumbnail.",
|
|
1664
1664
|
words: "The window as dates in the description. Each day's label: *8 October 2026: 42 requests*.",
|
|
1665
1665
|
access: "Every day is a named cell for assistive technology; the legend steps are named too. Colour is never the only reading: the value is in each label.",
|
|
1666
1666
|
},
|