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.

FileSize (gzipped)What it is
ph-app.css10 KBFont, tokens, light and dark mode, and every component's styles
ph-app.js8 KBwindow.phApp, the interactive components and the Performance Hub connection
ph-app-charts.js76 KBCharts, KPI tiles and heatmaps (Chart.js 4)
ph-app-calendar.js79 KBCalendars (FullCalendar 6.1.22)
ph-app-editor.js138 KBRich text editor (Tiptap 3.34.0, DOMPurify 3.4.18)
ph-app-maps.js284 KBMaps (MapLibre 5.24.1)
ph-app-datagrid.js15 KBData grid (TanStack Virtual 3.14.26)
ph-app-sortable.js16 KBDrag and drop (SortableJS 1.15.7)
ph-app-bridge.js2 KBThe Performance Hub connection on its own, for apps that use their own styles
tailwind-preset.cjs1 KBA Tailwind preset with the ph-* colours
manifest.jsonThe kit's name, version and file sizes
react/latest.jsonThe 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

ClassWhat it does
.ph-pageThe page: full width, 24px padding, 16px between sections
.ph-page--narrowUp to 760px wide, for settings forms and wizards
.ph-page-header, .ph-page-title, .ph-page-description, .ph-page-actionsThe page header
.ph-section-titleA heading inside the page (15px semibold)
.ph-gridAs many 260px-or-wider columns as fit
.ph-grid-2, .ph-grid-3, .ph-grid-4Up to 2, 3 or 4 columns, collapsing on smaller screens
.ph-span-2Spans two grid columns
.ph-splitA 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-spacerPushes what follows to the end of a row

See Layout.

Text and utilities

ClassWhat it does
.ph-mutedSecondary text colour
.ph-text-sm, .ph-text-xs13px, 12px text
.ph-text-success, .ph-text-warning, .ph-text-dangerStatus text colours
.ph-numNumbers with equal-width digits
.ph-truncateOne line, cut off with "…"
.ph-visually-hiddenHidden on screen, read by screen readers
.ph-icon (--sm, --lg)16px (14px, 20px) SVG icon
.ph-no-printHidden when printing

Components

AreaClassesPage
Buttons.ph-btn, --primary, --danger, --ghost, --sm, --lg, --block, .ph-icon-btn, .ph-icon-btn--outlined, .ph-btn-groupButtons
Tooltipsdata-ph-tooltip, data-ph-tooltip-position="bottom"Tooltips
Cards.ph-card, --flush, --compact, .ph-card-header, -title, -description, -footerCards
Badges and status.ph-badge and tones, .ph-status and tones, .ph-status--live, .ph-avatar, .ph-avatar-group, kbdBadges 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-fieldsetForms
Segmented control.ph-segmentedSegmented control
Toolbar and search.ph-toolbar, .ph-toolbar-actions, .ph-search, .ph-chipToolbar and search
Menus.ph-menu-wrap, .ph-menu, --end, .ph-menu-sep, .ph-menu-label, data-ph-menuMenus
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-hideTables
Tabs.ph-tabs with role="tablist"Tabs
Steps.ph-stepsSteps
Breadcrumbs.ph-breadcrumbsBreadcrumbs
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-staticDialogs and drawers
ToastsphApp.toast()Toasts
Callouts.ph-callout, --success, --warning, --danger, .ph-callout-body, -title, -actionCallouts
Empty states.ph-empty, --error, .ph-empty-title, .ph-empty-textEmpty states
Loading.ph-skeleton, -text, -title, -block, .ph-spinner, --lg, aria-busy on buttonsLoading
Progress and metrics.ph-progress, -fill, --success, --warning, --danger, --indeterminate, .ph-metric, -header, -valueProgress and metrics
Description lists.ph-dlDescription lists
Timeline.ph-timeline, .ph-timeline-item and tones, .ph-timeline-title, -timeTimeline
Lists.ph-listLists
Stat tiles.ph-stat, -label, -value, -meta, .ph-delta--up, --down, --flatKPI tiles
Codecode, 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-cardDrag 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.

GroupTokens
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

LibraryVersionUsed by
Chart.js4ph-app-charts.js, ph-app-kit-react/charts
FullCalendar6.1.22ph-app-calendar.js, ph-app-kit-react/calendar
Tiptap3.34.0ph-app-editor.js, ph-app-kit-react/editor
DOMPurify3.4.18Sanitising rich text
MapLibre GL5.24.1ph-app-maps.js, ph-app-kit-react/maps
TanStack Virtual3.14.26ph-app-datagrid.js, ph-app-kit-react/datagrid
SortableJS1.15.7ph-app-sortable.js, ph-app-kit-react/sortable
Material Design Icons (@mdi/js, @mdi/svg)7MdiIcon in ph-app-kit-react
Source Sans Pro400, 400 italic, 600, 700The 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.