This is the source of truth for GlitchTip's visual language: the tokens, the rules for using them, and the reasoning behind them. It is written for humans first, and its structure also makes it legible to AI coding assistants so generated UI stays on system.
The living, interactive version of this document is the Component Preview app (projects/component-preview/, run with npm run preview). It renders real components and reads token values live from the running theme.
The preview is the north star: it defines how each pattern should look and behave. Where the shipped product does not yet match a rule, that is tracked as a ticket, not a reason to water down the rule. Foundations (tokens, type, spacing) still read live from the theme so they cannot drift; component and pattern pages show the intended rule, and a designNotes chip flags any page whose ideal the product has not adopted yet.
We have been moving toward a rapid-prototype, code-first, AI-readable design system:
- Code-first. The reference renders real components and resolves tokens live from the DOM, not a static mock or a Figma file that goes stale the moment code changes.
- Rapid-prototype. A registry drives the preview: surfacing a new component or foundation is one entry in
registry.ts, so the system grows in minutes. - AI-readable. Explicit tokens plus this written spec let an assistant generate and review UI against a single source of truth instead of inventing generic defaults.
All tokens are CSS custom properties. Read them live; never hardcode a raw value that a token already expresses.
- Material 3 system roles:
--mat-sys-*(primary, surface, on-surface, error, outline, and their containers). Defined by@include mat.theme(...)insrc/styles.scss. - Extended app roles:
--warning-color,--info-color,--success-color(each with a-containerandon-pair), plus product accents--issues-color,--uptime-color,--logs-color. Defined at:rootinsrc/styles.scss. - Issue level roles:
--gt-level-sample,-debug,-info,-warning,-error,-fatal, aliasing the roles above. Painted by theissue-levelaccent mixin (fatal is striped), with each surface keeping its own bar geometry. Defined at:rootinsrc/styles.scss. - Theming: light and dark are driven by
color-schemeandprefers-color-scheme. The brand overrides for--mat-sys-primary,--mat-sys-on-primaryand--mat-sys-errorarelight-dark()pairs set withmat.theme-overrides, so they followcolor-schemelike the rest of the theme: the user's preference, or the OS when it is set to System. Light mode uses$brand-red(#cb3753, in_variables.scss, shared with marketing): white labels on it are 5:1 and red text on the light page 4.7:1, but small red text on the darker greys (panel strips, marketing's page) fails, so keep red there to large text and non-text. Dark mode uses#d94a5f. Red fills (filled buttons, the active nav item) get no grey or white state layer, which muddies or washes out the red: hover and press darken the red itself with--gt-primary-hoverand--gt-primary-pressed(derived from primary, so they follow the theme), nothing stays after a click, and keyboard focus getscontrols.focus-ring. Chart labels and gridlines use role tokens, so they follow it too. - Monitor status roles:
--gt-monitor-up,--gt-monitor-down,--gt-monitor-none, aliasing the success, error and outline roles. Used for the status pill and the check bars. Defined at:rootinsrc/styles.scss.
Rule: use a semantic role, not a raw hex. Text on a colored surface uses that surface's on- token so contrast holds in both schemes.
Colour only for meaning: error, warning, success and status (level bars, status dots, the root cause bar, an unhandled pill). Bars, charts of counts and everything else stay neutral; key values get weight (600, on-surface), not colour.
- Code: code blocks use the Prism token theme in
src/assets/styles/_code.scss(--gt-code-*) on the strip tint. Token colours come from the per-mode log palette and keep 4.5:1 on the code surface and the crash line in both modes. The crash line is an error tint with a 2px error bar. Markdown code blocks get the same theme.
- Material 3 type tokens:
--mat-sys-headline-small,-title-large/medium/small,-body-large/medium/small,-label-large/medium. Apply asfont: var(--token). - Semantic classes (in
src/assets/styles/_font-files.scss):.section-header-text(page titles),.section-header-text-light(issue titles),.body-text,.body-text-strong,.caption-text. These are responsive. - In-page subheading:
.gt-subheading(title-small, 600, on-surface, insrc/styles.scss) for a heading inside a page section, such as agt-listlabel..gt-subheading__descriptionis the muted line under it. - Fonts: IBM Plex Sans (UI), IBM Plex Mono (code), Material Symbols (icons), all self-hosted as woff2.
- Icons: Material Symbols, outlined at weight 300 and grade 0 (
.material-symbols, the registry's default class), so actions, navigation and inputs stay light next to text. There is no filled variant: state and emphasis come from color, text or the item's fill (the active nav item), never a filled glyph, since several glyphs barely change when filled. One glyph, one meaning:help(?) is Help & Support; help next to a field is link text ("Syntax"), as GitLab's Pajamas recommends. - Weights: three, each with one job: 400 for text you read, 500 for controls (buttons, tabs, the bar), 600 for headings, titles and links. Plex Sans ships a real file for each, so no weight is synthesized; don't use 700 or
bold.
Rule: prefer a semantic class where one exists; otherwise apply the matching type token.
- Sentences (page intros, section help) cap their width with
--gt-measure(70ch). Short centered text uses--gt-measure-narrow(44ch). Widths are in characters so they follow font size; field widths are a separate layout choice. - Orientation for a page or tab goes in the panel it explains: the description line of its first list or settings panel, never a loose line above it. Keep only what the title and rows do not already say.
- A link inside a sentence is underlined, in the text color, at normal weight (
.gt-prose a,.page-intro a). Standalone links (row names, nav, table cells) keep the bold global style. Never the primary color: in GlitchTip's theme it reads as a warning.
A 4px unit (--gt-space-unit) on an 8px rhythm, exposed as --gt-space-* and defined in src/styles.scss:
| Token | Value |
|---|---|
--gt-space-0 |
0 |
--gt-space-1 |
4px |
--gt-space-2 |
8px |
--gt-space-3 |
12px |
--gt-space-4 |
16px |
--gt-space-5 |
24px |
--gt-space-6 |
32px |
--gt-space-7 |
48px |
Rule: use these in new code instead of ad-hoc pixel values. Migrating existing usage onto the scale is planned follow-up work.
Two radii, by size, as GitLab's and Vercel's scales do. $shape-radius (4px) is for controls (buttons, fields, selects, toggles, the active nav row, platform tiles) and for what pops out of a control (menus, dropdowns, autocomplete, tooltips, the date picker), which Material also keeps small. $surface-radius (8px) is for surfaces on the page (cards, gt-panel, the gt-list box, the table box, code blocks, stat tiles) and dialogs, plus the shell corner ($shell-radius, the same 8px) where the top app bar's hairline turns down into the side nav's edge. A control inside an 8px surface keeps 4px, close to concentric. Data marks (chart and progress bars) keep their own small radius. Badges (.chip) use --mat-sys-corner-extra-small; counts (.tab-count) and status pills use --mat-sys-corner-full. Elevation uses Material 3 --mat-sys-level* shadows.
Reusable components live in src/app/shared/. Each documented component in the preview app carries: a description, when-to-use guidance, do and don't lists, an accessibility note, and a copyable usage snippet (via the shared preview-doc wrapper).
Conventions for every component:
- Standalone,
ChangeDetectionStrategy.OnPush, signal inputs and outputs. - Selector prefix
gt-. - Build write and delete controls behind the relevant permission signal (see the permission-gating convention in
AGENTS.md). - A blocked action shows its reason as visible text. It may be disabled beside that text, or hidden; never a tooltip-only reason.
- A slotted node (
slot="actions") projects only from a block with a single root, so give each slotted control its own@if, one element per branch.
- Only the page header, tabs and section bars sit loose on the page; everything else (descriptions, copy fields, lists, empty states) is in a panel.
- A panel title that repeats the tab or page it sits in is left out. If the header still has actions, a muted fact leads it in
slot="lead"(a list's count: "2 alerts", ICU plural with a named placeholder), so an action never sits in an empty strip. If there are no actions either, there is no header. - Charts and data blocks (stack traces, breadcrumbs, request data, code, a record's table of spans) sit in a
gt-panel. Useflushwhen the body draws its own rows, with the row classes in_panel-rows.scss(.gt-kv,.gt-property-list,.gt-raw,.gt-panel-row): hairlines between rows, no boxes, and an expandable row is a whole-row button witharia-expanded, whose static right chevron (.gt-chev) turns down while it is open. Nomat-cardfor new work. - A muted fact about the panel's data (a count, a source: "Breadcrumbs · 28") goes in
subtitle. The panel draws the middle dot, and the subtitle truncates before the title. UsehideSubtitleNarrowwhen it can go under 480px. - A box's body uses the page colour (
surface-container-low) with a hairline. Its header and footer strips are tinted one step up, insurface-container-high; a data table's column header row (.table-header) uses the same tint. A danger panel adds a red-tinted outline. There are no other panel variants. - A tab's content sits in panels. An empty state sits centred in an outline panel; an empty panel has no header.
A collection of records with a name and a few actions is a gt-list of gt-list-rows: the name, optional muted facts, then the actions at the end. An optional description line sits under the name.
- A collection of records (a table, a
gt-list, a code block) sits in a bordered container, with a line between rows. - A row that opens its record makes the name the link, written
<a gtListRowLink>. That makes the row navigable: the link's hit area covers the whole row, hovering the row draws the on-surface 8% state layer and underlines the name, keyboard focus rings the row. The link stays the only tab stop; row actions sit above the hit area and keep their own clicks. No separate Edit or View button repeats the link, and no chevron: a chevron means a row expands. - A navigable row's meta is text. A control in the row (a copy button, a menu) goes in the actions slot, which sits above the hit area.
- A copy button attached to a value is part of that value, not a row action.
- One action on a row is a visible outlined button. Two or more go in a menu at the end of the row.
- Row actions stay neutral, destructive ones included; the confirm dialog carries the warning.
- Rows with several columns to compare or sort are a table instead.
- Several meta facts each get their own span inside
[slot="meta"]; the row draws the separators, asgt-page-headerdoes. Never type a separator into a translated string. - A description line of facts (a project's platform and teams) gets
.list-row__facts, so the row draws the same separators there. - A row's state (Invite pending, Unverified) is a status pill after the name. A fixed attribute (Owner, Primary) is a neutral
.list-row__tag, which is not interactive. - When a row's action is blocked, say why in the row's description line; never only in a tooltip.
- A list page's create action is one filled "New " button in the top app bar. A list inside a record's tab puts it in the list panel's header actions as an outlined button with the add icon, led by the list's count. While the list is empty, the panel has no header and the button is the empty state's action.
- Projects are listed with
gt-project-rowseverywhere. On Home and Projects a row shows the name, then platform, teams and last event, and on the right the last 14 days of errors (the issue list's trend bars) and the unresolved count; a click opens its issues. Settings > Projects is the setup view: platform, teams, the alert count when there are alerts, and the created date, with no trend; a click opens its settings. A project with no events yet shows a "No events yet" state pill. A row loads its numbers when it scrolls into view, at most four at once, with placeholder bars meanwhile. Projects use thefoldericon everywhere.
Small labels come in four kinds. Shape says what kind of thing it is; color gives its value.
- Badge: a squared grey label for data you could copy or compare: identifiers in mono (
.chip: an issue id, a URL), fixed attributes (.list-row__tag: Owner, Primary). - State: a rounded grey pill with a colored dot (
gt-status-pill) for a state that changes: Up, Down, No data, Unresolved, Resolved, Ignored, Invite pending, Unverified, No events yet. A single colored dot always means a state, so never use one for a fixed fact (that's a badge: Unhandled, Owner), a category (chart legends use squares) or decoration. In a list, a row shows its state only when it differs from the list's default and the search doesn't already name it: the issue list pills Resolved and Ignored at the start of the caption, never Unresolved, and none underis:resolved. No state glyphs (checks, bells) before titles. - Level: a colored bar, as on issue list rows. On an issue's header the bar runs down the title block and the meta line names the level in plain text. A bar always means a level; fatal is striped.
- Count: a rounded grey pill with a number (
.tab-count) after a label.
Filters you can click are outlined tag chips (see Tag chips). Every label uses label-medium (12px).
Every record detail page opens with gt-page-header: the record's name, then one meta line of facts.
- Settings pages for a named object (organization, project, team, member) show an icon tile, using the same icon as that object's item in the nav. Data pages (issue, monitor, transaction, release) and profile pages do not.
- Those settings pages use
compact: one line with a 32px tile, the title in title-large and the meta facts inline after it, wrapping under the title on a narrow screen. Data pages keep the full header. - Data record pages open with a record band (
gt-record-band): a tinted band over the page's full width that holds the page header. Up to three key facts sit in its top right corner as stats (.gt-band-facts): the number in<b>over a short muted label, on the title's baseline. Anoutline-varianthairline sits between stats so the numbers stay evenly spaced when labels differ in length; it is the one place lines split items of the same kind. Keep a label to a word or two and put any detail in a tooltip, which underlines the number. Shorten counts withcompactNumber(12.3K) and durations withshortDuration(815ms, 1.60s). Further facts stay in the meta line. A summary of the whole record goes in the summary tier: a text summary (top tags) on a darker strip (summary="strip"), a graphic one (check bars) under a hairline; both span the band. The tab bar sits on the band's bottom edge. Write the corner facts once, as.gt-band-factspans in anng-template, and render it in both the corner and the end of the meta line; under 900px the corner hides and the meta line shows them. Settings records keep the compact header with no band. - A title that needs a second line of its own (an error's message under its type) uses
subtitle. Facts never go there. - The meta line lists facts in order of importance. Numbers go in
<b>, identifiers in a.chip. The component adds the separators. - No meta fact repeats the title: no slug chip under the name it comes from, no project chip under a version that already names it. If nothing is left, leave out the meta row.
- A record with a state (a monitor's Up or Down) shows it with
gt-status-pill, first in the meta line. The same pill shows that state in lists too. - A fact that continues the pill ("for 2 hours") gets class
no-sep, so no separator is drawn before it. - When the record has facets, tabs sit directly below the header, with counts in
.tab-count. The tab bar is the only line under a header; the header draws no divider. - Tab counts only on tabs whose content is a growing list where the number informs (alerts, members, projects, environments); a tab holding a single thing (the project DSN/key) has no count.
- A record may show one status strip between the header and its tabs (the monitor check bars). Nothing else goes there.
- Tabs drawn by one component use a
?tab=query param. Tabs that are separate routed components use child routes. The default tab has no?tab=, and tab clicks replace history. Counts show once known, including 0. - The back link and page actions live in the top app bar, never in the header.
- The title is the record's own name, not a sentence about it ("checkout-api", not "Settings for checkout-api"). Titles have one style; an identifier title (an email, a version) is not set in mono.
- Width follows the page's job. Pages for watching data (the Projects, Issues, Logs, Performance, Releases and Uptime lists, and the issue, transaction, release and monitor pages) are full width (
l-body l-body--full-width), so the body shares the top app bar's edges. The page inset (--gt-page-inset) is 16px, 15px on phones, and the top app bar uses the same, so a title, the search and the table start on one line. A table box fills the page to the bottom whatever its row count, so its edge stays put when you switch between lists. - Settings pages (including project, team and member settings) and forms stay centered at 1100px (
l-body) on every screen; forms read worse wider. The settings projects list is centered even though the Projects list is full width.
- The top app bar is 52px and stays at the top while the page scrolls (from tablet width), so the nav's corner always meets it. Every control in it is 32px: compact buttons (
controls.compact-buttonsfrom_controls.scss, also used by panel headers) and ghost select filters. Visual customisation of Material goes through its overrides/density mixins inmaterial-overrides/, never internal classes or::ng-deep. One exception: the ghost select spaces its arrow through.mat-mdc-select-arrow-wrapperin_select.scss, since mat-select has no token for that gap. _controls.scssalso holds the other shared control helpers; use them instead of raw values:state-layer(hover|focus|pressed)for hover and focus fills on our own controls (M3 opacity tokens),icon-size($size)for a mat-icon on a class the component owns,focus-ring($offset)for keyboard focus,middot($gap)for the dot between inline facts,status-dotfor the dot that marks a state, and the named container widths$narrow-bar,$narrow-panel,$wide-panel,$narrow-bandwith their mixinsnarrow-bar,narrow-panel,below-wide-panel,wide-panel,narrow-bandandwide-band.- Bar filters are ghost selects (
.gt-select-ghost): amat-selectwith no form field, so the bar shows only text and a chevron, with no field outline. Hover, keyboard focus and open use the same grey state layer as text buttons (state-layer(hover), thenstate-layer(focus)on focus and while open), with no focus ring and no primary colour. Wrap the select in a span with thegtSelectGhostdirective: it adds the class, tracks the open state and opens the select on clicks in the padding. Give each one anaria-labeland a fixed width; long names truncate. Write the value so it says what it filters ("All projects", "All Environments", "24h trend"); only when a value cannot be phrased that way, put a muted label in front (.gt-select-ghost__label).gt-ghost-selectwraps the pattern for view switches. - Bar text is one size on every page: the bar title (
.gt-bar-title) and the back link both use title-medium (16px), so moving from a list to a record only adds the chevron. Big titles live in the page body (gt-page-header). A count after the bar title is a.tab-countbadge, the same one tabs use, centred on the text; the title text then sits in.gt-bar-title__textso a long title ellipsizes and the count stays whole. No bareh1styling in a bar. - The bar draws only its bottom border. Controls of one kind are separated by gap spacing. Between two groups of different kinds (filters | actions, state | destructive) put a
.gt-bar-divider: 1px wide, 20px tall,outline-variant, centred, with 8px on each side. Never between two controls of the same kind, never at the bar edges, never with only one group. $top-app-bar-heightinsrc/assets/styles/_variables.scssis the only place that sets the bar height; the top app bar, the list app bar and the full-height layout read it. No per-page height overrides. If a control does not fit, apply a Material density mixin in the bar's own stylesheet.- The back link is
gt-back-link, in the bar and in tab sub-views alike: a text link with a chevron, naming the parent page with that page's nav label ("Projects", "Uptime Monitors"). An edit form goes back to its record and shows the record's name. Use one label at every width; never "Back to" or "View all". The component pulls itself left by the button's leading inset (12px), so its chevron sits on the container edge wherever it is placed; don't add a local margin to compensate. - List pages put one filled "New X" in the right slot. Profile pages set it as an
action(link and text) in their route data; the profile wrapper renders it. - Record pages have no filled button in the bar. Primary is for at most one main create or confirm action per page. A record with an edit page links to it with an outlined "Edit X".
- A record's status control in the bar is an outlined neutral dropdown that shows the same coloured dot as
gt-status-pill, never a filled primary button. - Outline tells you what a control does: an action (it changes the record, like status, Edit, Delete, or it does something with the record, like Copy for AI) is an outlined button; a control that only changes what you see (filters, time range, frame order, categories) is a ghost select with no outline. The one exception is the segmented control below, which keeps its hairline group outline. An action with extra options is a split button (
gt-split-button): one outlined shape, main part and caret separated by a hairline. In a bar under 600px it drops its label and keeps its icon, the same way a ghost select switches to itsshortLabel; a bar opts in withcontainer: gt-bar / inline-size(the top app bar andgt-paneldo). - A view switch with two or three short options you flip often is a segmented control (
mat-button-toggle-groupwith classgt-segmented: 32px, neutral, the selected option tinted with the focus state layer, as App | Full | Raw on an exception); longer or more options use a ghost select. - One extra action in a record bar is a neutral 32px icon button with a tooltip and an
aria-label("Delete issue"). Two or more extra actions go in a "More actions" menu. - Delete lives in one place. A record with a settings or edit page deletes from that page's last section (outlined warn button, then a confirm that names the object). A record without one deletes from the bar, as its icon button or a "More actions" item, with the same confirm.
- Verbs: "New X" opens a create form and is its title, "Create X" submits it, "Add X" attaches something that already exists, "Invite" sends an email.
- The right slot holds actions only, never facts such as the user's email.
Tables use mat-table inside .table-container with the shared global classes (see the Table pattern preview).
- Header row: one size for every table. Column headers are 32px, in label-medium and
on-surface-variant, set once inmaterial-overrides/_table.scss($table-header-height). The sticky action row above them (.table-header) keeps Material's own. Pages do not restyle header cells. - Narrow screens: columns drop as the window narrows, but the column header row stays, labeling the columns that remain.
- Numeric columns: put
.table-numericon the header and cells. They right-align with tabular figures, and the sort arrow goes before the label (arrowPosition="before"). Identifiers that happen to be numbers, such as issue IDs, stay left-aligned. - End column: put
.table-endon a short last column, such as a date, so it right-aligns. - One right edge: every table ends on the same right edge. The primary column flexes, secondary columns get a fixed width, and overflowing content truncates.
- Every field gets the house look globally from
material-overrides/_form-field.scss: outline appearance, 14px text and label, 4px radius, the theme's comfortable height. The resting outline is a mid-tone mix ofoutlineandoutline-variantthat stays at 3:1 or more against the page; hover, focus and error keep Material's colors. Filters in the top app bar are ghost selects, not fields (see Top app bar).
- Two layers with two jobs. The top app bar scopes the data (projects, time range); the filter band under it refines the list (search, filters) and sets the view (trend period, sort).
- The filter band is a full-bleed toolbar like
gt-record-band: thesurface-containertint, a bottom hairline, flush under the top app bar._filter-bar.scssholds it as global classes (gt-filter-bandon the band,gt-filter-baron its row); the search is theform[gtFilterSearch]component on every page;gt-data-filter-baris a band, and Logs wraps its own filters in one. As the page's first child, the band takes the place of the body's top margin. - One order everywhere: search first and growing, then filters, then view controls at the end (
.gt-filter-bar__viewon the first). A page without search keeps the same order. - Search is an outlined field (
controls.outlined-input, also for any other text box that can't be a form field): an 18px leading icon, the text, a clear button, then a "Syntax" text button after a short hairline when the page has search help. Enter submits; no submit glyph. - The clear button (✕, labelled Clear filters) shows while the field has text or a band filter is set. It empties the search and the band's filters, not the top app bar's scope. On Issues the is:unresolved default is ordinary search text, so it clears too.
- Search is 32px on one line and 40px on its own line when the band wraps.
- Filters and view controls are ghost selects showing only a value that explains itself ("All Environments", "24h trend", "Last Seen"); the name is the
aria-label. In the band they size to their value up to 240px, then truncate. A filter's "all" choice comes first. - Segmented controls belong in forms and settings, not the band.
- One line when the band is 720px or wider; below that search takes the first line and the other controls share the next. Wrapping follows the band's own width, not the window.
Every setting on a settings page is a gt-settings-section: a title, an optional line of help, then the control and its actions.
- A section description must say something the title and control do not (a consequence, a limit, non-obvious behaviour). Otherwise omit it.
- One panel per save unit: a section with its own Save, Add or Connect is a
panelsection, its action on the right of the tinted footer. A section that saves on change (toggles, a theme choice) is a panel with no footer. Panels stack 16px apart; fields keep the 560px column. - A list (members, projects, environments, emails, keys, tokens, alerts) is its own panel,
flushwhile it has rows, with aflushgt-listinside so only the panel draws a border. The field that adds to it is a separate panel above it, with Add in the footer. Header actions go inslot="header-actions"on a section,slot="actions"on a plaingt-panel. - The first section in its container sits flush with what is above it. Content starts 16px under a tab bar, from one global
mat-tab-nav-panelrule; pages do not pad their own panel. - The section title is a lone field's only visible label, linked with
aria-labelledby. A title hidden because it repeats the tab useshideTitle, so the label still reaches screen readers. - A settings panel's title sits at the top of its body, not in a separate title bar.
- Each section saves on its own, with an outlined Save that names what it saves ("Save name"). Settings pages have no filled button. Save stays enabled; it is disabled only while its request is in flight. An Add whose only input is a pick from a list (a member, a project) stays disabled until something is picked.
- A choice that shows its effect at once (the theme) saves on change, with no Save.
- Save-on-change disables the control while saving, is silent on success, and on failure rolls back and shows
gt-form-errorunder the control. - A destructive action is the last section, a
tone="danger"panel with an outlined warn button in its footer and a confirm dialog that names the object and says it cannot be undone. - A delete section's description names the object in bold: "Deletes checkout-api and all of its issues, events and settings. This cannot be undone." The
<strong>stays inside the i18n message. - A failed delete shows
gt-form-errorinside its delete section, not a toast. - Someone who cannot edit a setting sees its value as plain text, without the control. A read-only value in a slot sits in an element (a
<span>), not as bare text. - In a
gt-form-panel, field sections are direct children of the panel so the hairlines between them show. - Field errors from the server are mapped onto their controls with
mapFormErrorsin the submit handler, after the request returns. Never map them from aneffect(). Errors that belong to no field go ingt-form-errorat the bottom of the form panel's body, on create and edit forms alike. A settings section's own error goes in itserrorslot, at the bottom of its body above the footer. - A radio group in a section lines up with the section text. Short single-word choices (roles) sit in a
.gt-radio-rowthat wraps; longer labels stack in a.gt-radio-column. What the chosen option means goes under the group in a.gt-field-hint. - Create forms are titled New X, edit forms Edit X; the back link names where you return to.
- A create form ("New project", "New token") has its back link in the top app bar and a
gt-page-headertitled with the action. A form with one submit is one save unit: onegt-panel class="gt-form-panel"holding a section per field (hairlines between them) andgt-form-error, with a text Cancel and a filled "Create X" on the right of its footer. - An edit form takes the create form's shape, with an outlined "Save X" in the footer, then "Delete X" as a danger panel below it.
- The side nav sits on the page surface with one hairline on its right edge, with no tint or shadow. Beside the top app bar the edge is gone, so the logo row and the bar read as one strip; the bar's hairline turns down into the edge with the shell corner. The nav's dividers stop short at the rows' inset, so they never meet that edge. The shell's one decorative touch is a faint dot field (
shell.dot-cornerin_shell.scss) in the nav's empty bottom left; nothing behind controls or text, no shadows or color washes on the shell. The same dots can later serve the login page and empty states. Items are controls, so they use label-large (14px, 500) like the organization switcher, 40px rows 4px apart and 20px icons, and the active item keeps the brand red fill. The organization switcher is a ghost select, like the bar filters, in the same box as a nav row: its text starts on the icons' line and its caret ends 16px in, where the menu rows' carets end. The logo and switcher take 96px plus the divider's 4px, so the nav's first hairline continues the filter band's bottom line (bar 52 + band 48), expanded or collapsed. Collapsing moves the nav's width, the page edge and the shell corner together on one 200ms ease (all read--gt-nav-width), and the labels fade inside the moving edge; with reduced motion it snaps.
- A view opened by a query param inside a tab (an alert's edit form) starts with a
gt-back-linknamed after the tab ("Alerts"), the same component the top app bar uses. The page's top app bar belongs to the parent record.
- Tags render as tag chips (
.gt-tag-chipin.gt-tag-chips): key muted, value bold, in a hairline pill with no shadow. A share ("93%", "2 of 15") sits inside the chip, muted, after a middle dot.
A record seen through one occurrence at a time (an issue and its events) is laid out in two zones, so it is clear what Older and Newer change.
- Issue zone, at the top and static: the record band. Its header puts the message under the error type (
subtitle: two lines, the full text in a tooltip), runs the level down its left edge as a bar, has Events and Users as the corner stats, and the status shows only in the bar's status dropdown, not as a pill. The band's summary tier is a one-line Tags row on the strip: up to three of the most concentrated values as tag chips that filter, each with its share inside, then "All N tags" right after the last chip, opening the full ranking inline. When every chip would show 100% (one event, or constant tags), the shares are left out: they would say nothing. The link trails the chips so it reads as part of them; when no chip qualifies, the row is the label and the link. A user tag joins the chips only when one user has at least half of the tagged events (one user key at most). Keys never shorten and a value only when it is long; where three tags would not fit the row shows two whole ones, and under 600px two tags and the link wrap. "All N tags" shows whenever there is more than one tag, so a tag the row leaves out is always one click away. - The tabs sit on the band's bottom edge, between the zones.
- Occurrence zone: its header is a standalone section bar (a rounded, tinted strip in the panel header token) that sticks to the top of the scroll container while the zone is in view, starting with an occurrence switcher, with its actions and the steps on the right: a Latest link when not on the latest, then Older and Newer around the position ("2 of 240", or the count alone when the place is unknown). The switcher is a menu of links, since picking an occurrence navigates: a ghost-look trigger named for the occurrence ("Event", aria-label included) that reads "Latest event · 80214d5d" or "Event 80214d5d" (the last 8 characters of the GlitchTip event id in the URL, since ids are time-ordered and share their start; the full id in a tooltip, the SDK's own event id under More event data) plus only the facts the header does not already show (time when not the latest, environment, release when it differs from first seen); under 600px it shortens to "Latest" or the short id. The menu lists recent occurrences, newest first, loaded when first opened: each a link to its route with two lines (relative time with the absolute time in a tooltip and the same short id, then muted environment, release and user, truncated), the current one marked "current" (
aria-current="page"), and a last "Show more" item that loads the next page without closing the menu and moves focus to the first new occurrence. Picking one opens its own route, and the current occurrence stays on screen until the next one has loaded, so the scroll position holds. The panels follow it at the usual spacing. Once stuck, the bar becomes a second app bar: it spans the page inset edge to edge, square, with only a bottom hairline (--gt-page-inseton.l-body). Never wrap the zone's panels in another box: no box inside a box. - Aggregate summaries live in the issue zone, never inside the occurrence zone. Scope words follow: issue-level labels say "all events"; the occurrence's facts panel is "This event".
- Stepping to another occurrence briefly tints the zone (300ms fade, none with reduced motion); the issue zone stays still.
- The stack trace stays above the fold: the issue zone stays compact, and the exception comes first in the occurrence zone.
- The occurrence's facts panel keeps User, URL, Environment and the logo rows as rows and puts its other tags in one "Tags" row of chips; a tag shown as a fact row is not repeated there.
- Tag chips appear in Tags rows. Fact rows stay plain text so a field looks the same on every event; a filterable value is a quiet link. The occurrence zone shows no shares or counts: how common a value is belongs to the issue zone's Tags row.
- Color pairings must meet WCAG contrast; the preview app shows on-color pairings for a quick check.
- Interactive controls are keyboard reachable and have an accessible name.
- State (loading, disabled, selected) is conveyed by more than color alone.
- The preview app is the north-star rulebook; the product aligns to it via audit tickets, not the reverse. Deliberate divergence (rule set here, product migrated via tickets) is the model; ad-hoc divergence is not.
- Run a style audit per pattern to measure product drift and turn the gaps into tracked tickets.
- Document what the product ships, not what mature systems have. A page earns its place by answering questions developers actually hit; benchmark gaps are candidates, not requirements.
- Add a component or foundation by adding a
registry.tsentry and, where useful, wrapping it inpreview-doc.
Every page follows one of two templates so pages read the same way.
Component and pattern pages wrap the example in preview-doc, which fixes the section order. Fill, top to bottom:
- description: one or two plain sentences. What it is and where it is used.
- the live example (projected content).
- When to use / Do / Don't: short imperative lines.
- Writing: how to word the component's labels and copy. Include it when the component has user-facing text (button labels, dialog copy, banner headlines, field labels); omit it otherwise.
- Accessibility: the one thing an implementer must get right.
- Keyboard: only when the component has behavior beyond default tab-and-activate.
- Anatomy: the named parts, when the component has parts worth naming.
- Relationships: which components this one is meant to sit inside (
within) and which it is meant to hold (contains). Include it wherever composition is not obvious. Every claim must be verifiable in product code (grep the usage before writing it); omitwithinwhen a component is used everywhere, and qualify acontainsthat only holds for one variant. - Properties: the input/output table.
- Usage: a copyable snippet of the real component.
Required on every component page: description, example, When to use, Do, Don't, Accessibility, Properties, Usage. Writing, Keyboard, and Anatomy are added only when they carry real information, never as filler.
Foundation and reference pages (colors, spacing, typography, icons, symbols) do not use preview-doc. They document tokens or assets, not usage, so they use a page header, a one-line lead, and the reference content, and they read values live from the theme wherever possible so they cannot drift. They carry no When to use or Do/Don't.
Voice: plain and human. A verb-first instruction beats a description of one. No em or en dashes. Only essential, helpful information. Sentence case for every label, title and button; proper nouns keep their capitals.
Icons: a preview example may only use a Material Symbol that is in the app's self-hosted subset (the list on the Material symbols page); any other name renders as broken ligature text, not a glyph.
Every documented component carries a status, following the practice of published design systems (Polaris, USWDS, Carbon):
- stable: current conventions (signal inputs/outputs, OnPush), reviewed, safe to use.
- legacy: works and is supported, but predates current conventions and is slated for an update. Fine to use; expect changes.
- deprecated: do not use in new code; the component's page names the replacement.
Statuses live on the registry.ts entry and render as each page's preview-doc chip (the nav stays label-only so it cannot overflow). Updating a legacy component to current conventions flips its badge to stable, which makes modernization progress visible.
Orthogonal to the lifecycle status (which tracks code conventions), a page can carry designNotes: neutral chips flagging design polish, e.g. "visual refresh planned" or "off-system by design". These come out of the visual audit done while isolating components into this guide, and each note is expected to become a ticket. This keeps two honest, separate answers on every component: is the code current, and does it look on-system.
The style guide is published with GitLab Pages, sharing the one Pages site this project gets with the marketing website: marketing at the root domain, the style guide at /style-guide/. Both are built by the single pages job in .gitlab-ci.yml.
Why this shape:
- A GitLab project has exactly one Pages site. A second
pagesjob on another branch would replace the marketing site, so the style guide must build inside the same job. - The job runs on the
marketingbranch. To refresh the published style guide, mergemasterintomarketing(the same flow as a website update). Publication is therefore a deliberate release, not automatic on every master commit. - The style guide build passes
--base-href /style-guide/; that value must match the subpath or its assets 404. - The page is world-readable on the marketing domain. Treat it as public: it is a component library and a credibility asset, and nothing confidential belongs in it.
- If we later want the style guide tracking
masterindependently of marketing releases, the upgrade paths are GitLab parallel Pages deployments (pages.path_prefix, paid tier; GlitchTip may qualify through the GitLab Open Source Program) or a dedicated project.
Until it is published, run it locally with npm run preview (port 4300, requires node 22+).
Direction for the system beyond the current guide, roughly in order:
- Audit tickets. Work through the tracked backlog: standardize submit buttons on gt-loading-button, then the medium/low items.
- API-table sync check. The properties tables in the guide are hand-written; add a small check (script or agent step) that diffs each component's
input()/output()signatures against its documentedapirows so the docs cannot silently drift. - Visual regression. Screenshot the guide's pages in CI (Playwright) and diff on merge requests, so token or component changes show up as reviewable image diffs.
- Brand tokens partial. The Brand section is live in the guide (Product | Brand toolbar tabs): marketing shares the product's Material theme and adds display typography (
.marketing-headingscale), the.fancyitalic accent, and two accent tokens (--mkt-accent-blue/yellow). Those brand styles are currently mirrored into the preview's stylesheet; extract them into a shared partial that both marketing and the preview import so there is a single source. - Design-system assistant. Defined in
ASSISTANT.md: a chat assistant over the structured registry, preview files, tokens, and this document, answering the long-tail questions ("which component for X?", "how does this behave on mobile?") so the written docs stay lean while depth is on demand. Near term it is a Claude Project / GPT fed those files; later an "Ask" panel in the hosted guide. This is what lets us document principles and canonical examples rather than every edge case by hand. - Storybook evaluation. Revisit if the guide passes ~25 components or a designer joins who needs an interactive controls panel; the content (tokens, guidance, API rows) ports to Storybook MDX either way.