Reference
On this page
Everything in the PH App Kit on one page: the files, the classes by area, the optional scripts and the libraries they're built on.
Files
All files are served from https://app.performancehub.co/assets/app-kit/v1/. Version 1 keeps the
same URLs and only adds to them; a change that breaks apps would come as v2.
| File | Size (gzipped) | What it is |
|---|---|---|
ph-app.css | 10 KB | Font, tokens, light and dark mode, and every component's styles |
ph-app.js | 8 KB | window.phApp, the interactive components and the Performance Hub connection |
ph-app-charts.js | 76 KB | Charts, KPI tiles and heatmaps (Chart.js 4) |
ph-app-calendar.js | 79 KB | Calendars (FullCalendar 6.1.22) |
ph-app-editor.js | 138 KB | Rich text editor (Tiptap 3.34.0, DOMPurify 3.4.18) |
ph-app-maps.js | 284 KB | Maps (MapLibre 5.24.1) |
ph-app-datagrid.js | 15 KB | Data grid (TanStack Virtual 3.14.26) |
ph-app-sortable.js | 16 KB | Drag and drop (SortableJS 1.15.7) |
ph-app-bridge.js | 2 KB | The Performance Hub connection on its own, for apps that use their own styles |
tailwind-preset.cjs | 1 KB | A Tailwind preset with the ph-* colours |
manifest.json | The kit's name, version and file sizes | |
react/latest.json | The current ph-app-kit-react package: file name, version, integrity and peer dependencies |
Load the stylesheet in <head>, and the scripts with defer, optional scripts after ph-app.js.
See Getting started.
Classes
Layout
| Class | What it does |
|---|---|
.ph-page | The page: full width, 24px padding, 16px between sections |
.ph-page--narrow | Up to 760px wide, for settings forms and wizards |
.ph-page-header, .ph-page-title, .ph-page-description, .ph-page-actions | The page header |
.ph-section-title | A heading inside the page (15px semibold) |
.ph-grid | As many 260px-or-wider columns as fit |
.ph-grid-2, .ph-grid-3, .ph-grid-4 | Up to 2, 3 or 4 columns, collapsing on smaller screens |
.ph-span-2 | Spans two grid columns |
.ph-split | A 220px side column and a main column, from 900px wide |
.ph-stack (--sm, --lg) | A column with 16px (8px, 24px) gaps |
.ph-row (--between, --end, --nowrap) | A row with 8px gaps |
.ph-spacer | Pushes what follows to the end of a row |
See Layout.
Text and utilities
| Class | What it does |
|---|---|
.ph-muted | Secondary text colour |
.ph-text-sm, .ph-text-xs | 13px, 12px text |
.ph-text-success, .ph-text-warning, .ph-text-danger | Status text colours |
.ph-num | Numbers with equal-width digits |
.ph-truncate | One line, cut off with "…" |
.ph-visually-hidden | Hidden on screen, read by screen readers |
.ph-icon (--sm, --lg) | 16px (14px, 20px) SVG icon |
.ph-no-print | Hidden when printing |
Components
| Area | Classes | Page |
|---|---|---|
| Buttons | .ph-btn, --primary, --danger, --ghost, --sm, --lg, --block, .ph-icon-btn, .ph-icon-btn--outlined, .ph-btn-group | Buttons |
| Tooltips | data-ph-tooltip, data-ph-tooltip-position="bottom" | Tooltips |
| Cards | .ph-card, --flush, --compact, .ph-card-header, -title, -description, -footer | Cards |
| Badges and status | .ph-badge and tones, .ph-status and tones, .ph-status--live, .ph-avatar, .ph-avatar-group, kbd | Badges and status |
| Forms | .ph-form, .ph-form-row, .ph-field, .ph-label, .ph-required, .ph-hint, .ph-error, .ph-input, .ph-select, .ph-textarea, .ph-input-group, .ph-input-addon, .ph-check, .ph-switch, .ph-slider, .ph-fieldset | Forms |
| Segmented control | .ph-segmented | Segmented control |
| Toolbar and search | .ph-toolbar, .ph-toolbar-actions, .ph-search, .ph-chip | Toolbar and search |
| Menus | .ph-menu-wrap, .ph-menu, --end, .ph-menu-sep, .ph-menu-label, data-ph-menu | Menus |
| Tables | .ph-table-wrap, --flush, .ph-table, --dense, .ph-actions, .ph-row-link, .ph-table-empty, data-ph-table, data-page-size, data-sort, data-value, data-ph-hide | Tables |
| Tabs | .ph-tabs with role="tablist" | Tabs |
| Steps | .ph-steps | Steps |
| Breadcrumbs | .ph-breadcrumbs | Breadcrumbs |
| Dialogs and drawers | .ph-dialog, --sm, --lg, .ph-dialog-header, -title, -description, -body, -footer, .ph-drawer, --lg, data-ph-open, data-ph-close, data-ph-static | Dialogs and drawers |
| Toasts | phApp.toast() | Toasts |
| Callouts | .ph-callout, --success, --warning, --danger, .ph-callout-body, -title, -action | Callouts |
| Empty states | .ph-empty, --error, .ph-empty-title, .ph-empty-text | Empty states |
| Loading | .ph-skeleton, -text, -title, -block, .ph-spinner, --lg, aria-busy on buttons | Loading |
| Progress and metrics | .ph-progress, -fill, --success, --warning, --danger, --indeterminate, .ph-metric, -header, -value | Progress and metrics |
| Description lists | .ph-dl | Description lists |
| Timeline | .ph-timeline, .ph-timeline-item and tones, .ph-timeline-title, -time | Timeline |
| Lists | .ph-list | Lists |
| Stat tiles | .ph-stat, -label, -value, -meta, .ph-delta--up, --down, --flat | KPI tiles |
| Code | code, pre, .ph-code, .ph-kbd | |
| Drag and drop | .ph-sortable-list, .ph-sortable-handle, .ph-board, .ph-board-column, -column-header, .ph-board-list, .ph-board-card | Drag and drop |
Plain elements
Without classes, the kit styles body, headings, paragraphs, links, hr, code, kbd, pre,
images and focus rings. Tables, lists, buttons and inputs need their kit classes.
Tokens
Colours are CSS variables holding RGB channels, used as rgb(var(--ph-blue)) or
rgb(var(--ph-blue) / 0.1). The full list with light and dark values is in
Theming.
| Group | Tokens |
|---|---|
| Surfaces | --ph-page, --ph-surface, --ph-surfaceRaised, --ph-container |
| Text and borders | --ph-primary, --ph-secondary, --ph-grayDisabled, --ph-grayOutline, --ph-borderDark, --ph-grayBorder-1, --ph-grayBorder-2 |
| Brand | --ph-blue, --ph-purple, --ph-cyan, --ph-pink |
| Status | --ph-green-1 to -3, --ph-red-1 to -3, --ph-orange-1 to -3 (text, fill, solid) |
| Charts | --ph-chart-1 to --ph-chart-8 |
Libraries
| Library | Version | Used by |
|---|---|---|
| Chart.js | 4 | ph-app-charts.js, ph-app-kit-react/charts |
| FullCalendar | 6.1.22 | ph-app-calendar.js, ph-app-kit-react/calendar |
| Tiptap | 3.34.0 | ph-app-editor.js, ph-app-kit-react/editor |
| DOMPurify | 3.4.18 | Sanitising rich text |
| MapLibre GL | 5.24.1 | ph-app-maps.js, ph-app-kit-react/maps |
| TanStack Virtual | 3.14.26 | ph-app-datagrid.js, ph-app-kit-react/datagrid |
| SortableJS | 1.15.7 | ph-app-sortable.js, ph-app-kit-react/sortable |
Material Design Icons (@mdi/js, @mdi/svg) | 7 | MdiIcon in ph-app-kit-react |
| Source Sans Pro | 400, 400 italic, 600, 700 | The font, in ph-app.css |
React apps install these libraries themselves for the modules they use, at the versions above. The
FullCalendar packages are @fullcalendar/core, daygrid, interaction, list, react and timegrid;
the Tiptap packages are @tiptap/core, extensions, pm, react and starter-kit.
react/latest.json lists every package under peerDependencies.