On this page

InstallationWhat it isWhich one to useAnatomyIn a sentenceOn one lineA value to pasteIn a table cellSecondary text colorA figure or a name, not codeA long value that wrapsKeyboard and screen readerIn the dashboardAPI ReferenceInlineCodeIn a tableTokensRulesWritten downOpen questions

Inline code

A literal in running text: a name to type, an identifier, a key. Cut to one line in the Kbd's box, it sits beside the Copy button for a value to paste.

To continue, type acme-prod below.

https://gateway.dome.example/gateways/3f2b9c1e-7a44-4d0b-9e61-2c8f5d0a1b77
1<p>2  To continue, type <InlineCode>acme-prod</InlineCode> below.3</p>4 5<InlineCode truncate>{gateway.endpoints.gatewayUrl}</InlineCode>6<CopyButton boxed value={gateway.endpoints.gatewayUrl} label="Copy endpoint" />

Installation

import { InlineCode } from "@catalog-dashboard/components/inline-code";
import { CopyButton } from "@catalog-dashboard/components/copy-button";

// In a table's cell:
import { TableCodeCopy, TableCopyButton, TableInlineCode } from "@catalog-dashboard/components/table";

What it is

A literal, in mono on the Kbd's fill. In a sentence it flows with the text. With truncate it is one line in the Kbd's box (its fill, its 5px corners, its 20px height; the Kbd has no edge, so this has none), cut where its room ends.

A value to paste is that box and the Copy button boxed beside it: two components, the code and its copy, so a cut value and its copy read as one and two. The gray pill that tables show today is another control, outside the design system (CopyableText).

Kbd ⌘KInline code acme-prodWith its copysk_live_8f2c41d09b7e

Which one to use

Each has one job.

What it isUseWhy
A literal the reader reads or typesInlineCodeIt sits in the sentence and wraps with it.
A figure or a name that must stand out in a sentenceInlineCode mono={false}The same box, in the sentence's own typeface: it is not code.
A value the reader will paste: an endpoint, an id, a keyInlineCode truncate and CopyButton boxedThe value and its copy, two boxes 4px apart.
The same, in a table cellTableCodeCopy with TableInlineCode and TableCopyButtonThe copy button there is the row's own: its icon alone, shown with its row.
A code in a table cell, nothing to pasteTableInlineCodeA cell is one line: the value is cut.
Something to copy that is not shown: an entity's ID, from its page's headerCopyButtonNothing is shown to put in a box.
A value in a form, or a secret to show and hideInput readOnly, with copyable or revealableA field shows the whole value, and has the eye for a secret.
A key to pressKbdA key is not a value.
Is it a key to press (⌘K)?
 ├── Yes → Kbd
 └── No
      ├── Is it in a form, or a secret to show and hide?
      │    └── Yes → Input, readOnly, with copyable or revealable
      ├── Is the thing to copy not shown (an entity's ID, from its page's header)?
      │    └── Yes → CopyButton
      ├── Will the reader paste it (an endpoint, an id, a key)?
      │    ├── In a table cell → TableCodeCopy: TableInlineCode + TableCopyButton
      │    └── Otherwise → InlineCode truncate + CopyButton boxed, 4px apart
      ├── Is it in a table cell?
      │    └── Yes → TableInlineCode
      ├── Must it stay on one line?
      │    └── Yes → InlineCode truncate
      ├── Is it a figure or a name in a sentence, not code?
      │    └── Yes → InlineCode mono={false}
      └── Default (a literal to read or to type) → InlineCode

Anatomy

sk_live_8f2c41d09b7e
  1. 1 · The Inline code. The Kbd's fill, 5px corners, 20px tall, 5px either side. The value is cut with “…”; a drag selects it.
  2. 2 · The Copy button, boxed. A 20px square in the same fill, 4px after the code. A 12px icon, 4px around it.

In a sentence

A literal the reader reads or types. It is monospace, 1px under the text beside it (12px in 13px text), on the Kbd's fill, with 4px corners. It flows with the sentence: a line break carries its box to both lines, and it does not make a 20px line taller.

To continue, type acme-prod below.

1<p>2  To continue, type <InlineCode>acme-prod</InlineCode> below.3</p>

On one line

truncate draws the value in the Kbd's box, 20px tall with 5px corners, with 5px either side, on one line. Where its room ends the value is cut with “…”, and only then does the pointer or the focus show the whole value in a tooltip. The value stays text: it can be selected, and a click on it does nothing. The box has no width of its own: its parent sets it (in a table, the column). The example sits in a box 280px wide.

https://gateway.dome.example/gateways/3f2b9c1e-7a44-4d0b-9e61-2c8f5d0a1b77
1<InlineCode truncate>{gateway.endpoints.gatewayUrl}</InlineCode>

A value to paste

A value the reader will paste (an endpoint, an id, a key) is two components side by side, 4px apart: the Inline code, cut to its room, and the Copy button, boxed: a 20px square in the same fill, with the same corners. Neither holds the other. The Copy button is never cut; under the pointer the ghost Button's hover tint lies over its fill and its icon turns full color; its tooltip says what it copies (“Copy key”), then “Copied” once the value is on the clipboard, and its cursor is the arrow: the pointing hand is for what goes to another page.

The key is shown once: sk_live_8f2c41d09b7e

1<p>2  The key is shown once:{" "}3  <span className="inline-flex max-w-full min-w-0 items-center gap-1 align-baseline">4    <InlineCode truncate>{key}</InlineCode>5    <CopyButton boxed value={key} label="Copy key" />6  </span>7</p>

In a table cell

In a row, TableCodeCopy places the code and the row's own copy button, TableCopyButton: the link one, not the boxed one. It is its icon alone, gray, with no box and no fill, and the full text color under its pointer; 6px round it take the click and show nothing (24px in all). They sit 6px apart, both above the row's link, so a click on them is their own. The button shows while its row is under the pointer or holds the keyboard's focus, as every copy button in a row does, and keeps its place while it does not: the code is cut to what the button leaves and never moves when the pointer comes. Under 42px of room, in a column a person narrowed by hand, the button goes and the code takes the room. In a cell the code is TableInlineCode, which sets secondaryitself: the color of the table's values, its fill still setting it apart. The tooltip says “Copy” and nothing more; a screen reader still hears what and which row, from the button's aria-label (“Copy endpoint for Default gateway”). A code with nothing to paste is TableInlineCode alone. The Endpoint column here is 240px wide.

Default gatewayhttps://gateway.dome.example/gateways/3f2b9c1e-7a44-4d0b-9e61-2c8f5d0a1b77
Staging toolshttps://gateway.dome.example/gateways/9d1c7b52-0e3a-4f6d-8a25-6b4e1f7c3d90
Local devhttp://localhost:8443
1{2  id: "endpoint",3  header: "Endpoint",4  width: 240,5  cell: (row) => (6    <TableCodeCopy>7      <TableInlineCode>{row.endpoint}</TableInlineCode>8      <TableCopyButton value={row.endpoint} label="Copy" aria-label={`Copy endpoint for ${row.name}`} />9    </TableCodeCopy>10  ),11}

Secondary text color

secondary sets the value in the secondary text color, the color of a table's values. In a table cell TableInlineCode sets it already. Off, the default, the value is the full text color, for a code in a sentence or a row of its own.

acme-prodacme-prod
1<InlineCode truncate>acme-prod</InlineCode>2<InlineCode truncate secondary>acme-prod</InlineCode>

A figure or a name, not code

mono off is the same box around text that is not code: a figure or a name that must stand out in a sentence. It is a span, not a code. Only the typeface changes: the sentence's in place of the mono one. It is the sentence's own size (the one-pixel step exists only because mono reads larger), and it takes its weight from where it sits: regular in a body sentence, medium when written as a label, as the figures and names of Home's Activity sentences are. No prop picks the weight.

3,032 tool calls. The busiest hour was 1 PM.

3,032 tool calls. The busiest hour was 1 PM.

1// Regular: it sits in the sentence's body text.2<p className="text-body-2">3  <InlineCode mono={false}>3,032</InlineCode> tool calls. The busiest hour was <InlineCode mono={false}>1 PM</InlineCode>.4</p>5 6// Medium: the figure is written as a label, and the box takes it.7<p className="text-body-2">8  <span className="text-label-2"><InlineCode mono={false}>3,032</InlineCode></span> tool calls. The busiest hour was{" "}9  <span className="text-label-2"><InlineCode mono={false}>1 PM</InlineCode></span>.10</p>

A long value that wraps

Without truncate a long value wraps with the sentence, and breaks anywhere. The example sits in a box 280px wide.

The gateway answers at https://gateway.dome.example/gateways/3f2b9c1e-7a44-4d0b-9e61-2c8f5d0a1b77.
1<p>2  The gateway answers at <InlineCode>{gateway.endpoints.gatewayUrl}</InlineCode>.3</p>

Keyboard and screen reader

KeyDoes
TabA cut code is a stop: its focus shows the whole value. Then the Copy button, whose focus shows its tooltip.
Enter, SpaceOn the Copy button: copies the value. The tooltip says “Copied”.

A screen reader reads the value, then a button named “Copy endpoint”. Once the value is on the clipboard the button is named “Copied” for 2 seconds, and a status beside it says “Copied”, so the change is read out. If the browser refuses the clipboard, nothing changes: the button never says “Copied” for a value that was not copied.

In the dashboard

A name to type

39 inline codes in 18 files: the name to type in a confirm dialog, an identifier in a sentence, a claim in a rule.

app/(authenticated)/[kind]/[scopeId]/settings/danger-zone/page.tsx

The older copy control

34 uses in 23 files of an older control that is not in the design system: 31 draw a gray pill that copies on a click anywhere, 3 a bordered chip that says ID. No screen on main uses the two components yet.

components/shared/copyable-text.tsx

API Reference

InlineCode

Besides these, the props of a <code>. The Copy button's boxed is on its own page.

PropTypeDefaultDescription
childrenReactNode—The value.
truncatebooleanfalseOne line in the Kbd's 20px box, cut with “…” where its room ends; the whole value in a tooltip only when it is cut. Off, a long value wraps with the sentence.
secondarybooleanfalseThe value in the secondary text color (--neutral-fg-secondary), the color of a table's values (TableInlineCode sets it in a cell). Off, the full text color.
monobooleantrueOff, the box holds text that is not code (a figure, a name in a sentence), in a span. It takes the typeface, the size and the weight of the text it sits in: regular in body text, medium inside a label.
classNamestring—Styles the code.

In a table

PropTypeDefaultDescription
TableInlineCodeInlineCodeProps—The Inline code with truncate, relative z-10 like the Table's other cell pieces, and secondary: the table's secondary text color (table rule T1).
TableCodeCopyComponentProps<"span">—Places its two children, a TableInlineCode and a TableCopyButton, 6px apart, above the row's link: the code cut to what the button leaves, and under 42px of room the button gone. It draws nothing of its own.

Tokens

In ds/tokens/inline-code.css. The colors and the size follow other tokens, so dark mode needs no line of its own. The cut form's corners and height are the Kbd's at its md size (5px, 20px), as classes in inline-code.tsx; its room either side is its own token. The boxed Copy button takes the same fill, with the ghost Button's --hover tint over it under the pointer.

TokenValueWhat it sets
--inline-code-backgroundThe Kbd's fillThe box's fill, and the boxed Copy button's.
--inline-code-foreground-textThe text colorThe value.
--inline-code-secondary-foreground-textThe secondary text colorThe value with secondary: in a table cell.
--inline-code-font-size1px under the text beside it, never under 10pxThe value's size: 12px beside 13px text.
--inline-code-padding-inline5pxThe cut form's room either side of the value.

Rules

Written down

Type acme-prod below

Do12px mono beside 13px text.

Type acme-prod below

Don’t13px mono beside 13px text: the mono reads larger.

Mono is 1px under the text beside it

Mono reads larger than the text beside it at the same size. So an inline code is 12px beside 13px text and 11px beside 12px text, the sizes of body-mono-3 and body-mono-4. It does this by itself: a screen sets no size on it. Beside 15px text it is 14px, which is not a size of the type scale.

From ui/ds/README.md (Layers, Type roles).

https://gateway.dome.example/gateways/3f2b9c1e-7a44-4d0b-9e61-2c8f5d0a1b77
DoThe code, then the Copy button, 4px apart.
https://gateway.dome.example/gateways/3f2b9c1e-7a44-4d0b-9e61-2c8f5d0a1b77
Don’tA copy button drawn inside the code's box.

A value and its copy are two components

“One is a truncated element and the other is a copy, because it's not really working together.” Neither holds the other, and neither has a prop that brings in the other's behavior.

From The designer, 2026-11-17.

A control at a box's edge has equal space around it

The boxed Copy button's icon has 4px above it, 4px at each side and 4px below it.

From .claude/rules/dashboard-ui.md (rule 9).

An icon takes the size its component sets

The rule: an icon is 14px unless its component sets another size, and is never shrunk to look lighter. Here the component is the Copy button, which sets 12px when it is boxed.

From .claude/rules/dashboard-ui.md (rule 4).

Screens are built from the shared components

A screen does not style a span into a code or a chip: it uses these components.

From .claude/rules/dashboard-ui.md (rule 1).

Open questions

Is a value copy-on-click?

Open
Built

No. Only the Copy button copies; the value can be selected, and a click on it does nothing (the designer, 2026-11-17).

Written

design/principles.md (7. Permissions, Scope, and Identity): identifiers render in mono and are copy-on-click.

Does a copy also show a toast?

Open
Built

No. The check and the “Copied” tooltip answer where the click was.

Written

design/principles.md (Toasts) lists copy-to-clipboard among what triggers a toast.

Do the three audit headers keep their chip that says ID?

Open
Proposed

No: they take the Copy button alone, as a detail page's header has.

The other way

Keep a chip that says ID. The Copy button shows an icon only: the chip would need a Copy button with a word on it.

Catalog
Foundations
  • Overview
  • Tokens
  • Token usage
  • Typography
  • Icons
Atoms
  • Avatar
  • Badge
  • Button
  • Checkbox
  • Color picker
  • Copy button
  • Icon tooltip
  • Inline code
  • Input
  • Hint
  • Kbd
  • Loader
  • Native select
  • Progress bar
  • Progress ring
  • Radio
  • Select
  • Status dot
  • Switch
  • Text link
  • Textarea
  • Tooltip
  • Truncate
Molecules
  • Accordion
  • Activity chart
  • AI elements
  • Alert
  • Button group
  • Card
  • Code block
  • Combobox trigger
  • Command
  • Context switcher
  • Dropdown menu
  • Empty state
  • Field
  • Field group
  • Filter chip
  • Flow
  • Icon picker
  • Metric card
  • Modal
  • Modal confirmation
  • Pagination
  • Popover
  • Scroll area
  • Sidebar
  • Table
  • Tabs
  • Toggle group
LibraryPublished release