Dashboard
Introduction
Section titled “Introduction”Renders a configurable, API-driven dashboard from one versioned JSON definition. The definition describes the layout per breakpoint, the widgets, their data sources, dashboard variables, pages, and style; the dashboard renders it with Dashboard Grid and Dashboard Widget and keeps it as the single source of truth. Users switch between view and edit mode when the host allows editing, move and resize widgets by pointer or keyboard, add, edit, and remove widgets, and undo every change. Every change emits the new validated definition (aui-dashboard-change) for the host to store.
Widget data comes from same-origin or allow-listed cross-origin APIs through a host fetcher that owns authentication, from static data, or from mock data. Definitions never carry code: widget types and custom transforms are registered in code, mapping uses JSON Pointer, and data shaping uses a fixed set of declarative transforms.
- One JSON definitionWidgets, data sources, variables, and pages come from one versioned definition.
- Built-in widgetsKPI, chart, list, progress, table, and text widgets ready to register.
- Edit modeUsers move, resize, add, and remove widgets, with undo, redo, and reset.
- Safe data loadingData sources call only allowed origins, with retries, caching, and your own fetcher.
- Variables and pagesFilters feed data source parameters, and pages split large dashboards.
Use it for
- Dashboards whose layout and widgets users or administrators configure, saved per user or tenant as JSON.
- Pre-canned dashboards shipped as JSON and rendered without page code, with data from your APIs.
- Letting users build widgets in the browser (type, data source, mapping, style) and keep the result as JSON.
Use something else for
- A fixed page of a few charts written in code: compose Dashboard Grid, Dashboard Widget, and the chart components directly.
- Free-form canvases with overlapping items or pixel positions.
- Business logic in the dashboard (calculations beyond the declarative transforms): compute it in your API or register a custom transform.
Anatomy
<div class="aui-dashboard-root" data-aui-density="compact"> <div class="aui-dashboard-kiosk">pause toggle, exit</div> (kiosk mode only) <div class="aui-dashboard-toolbar" role="group" aria-label="Sales controls"> <div class="aui-dashboard-toolbar__variables">date range, select, text, number controls</div> <div class="aui-dashboard-toolbar__actions">Refresh, Undo, Redo, Reset, Add widget, JSON, Edit switch</div> </div> <div class="aui-dashboard-root__pages">Tabs (pages only); the grid sits in the selected tab panel</div> <div class="aui-dashboard-root__grid aui-dashboard" role="region" aria-label="Sales widgets"> <section class="aui-dashboard-widget aui-widget" data-aui-item="revenue" data-aui-status="ready" role="region"> <div class="aui-widget__header">title, subtitle, refresh/edit/collapse/maximize/remove</div> <div class="aui-dashboard-widget__body">rendered by the widget type</div> <div class="aui-dashboard-widget__state" role="status">Loading | No data | error + Retry</div> <div class="aui-dashboard-widget__footer"><time>Updated 10:42</time></div> </section> </div></div>Live example
Section titled “Live example”Use the bar above each frame to switch theme, density, direction, and locale.
Dashboard in the Configurable dashboard showcase
Section titled “Dashboard in the Configurable dashboard showcase”The part of the Configurable dashboard showcase that uses Dashboard. Change its options, use it with the keyboard, and watch the event log; the link in the frame opens the full showcase. The bar above the frame switches theme, density, direction, and locale.
Showcase source
// Dashboard showcase: a configurable dashboard from one JSON definition, with data from a// simulated API, a filter, pages, edit mode with drag-and-drop and keyboard moves, the widget// builder, the JSON editor, undo and redo, and the definition shown live as JSON.import { Dashboard, type DashboardChangeDetail, type DashboardFetcher } from '@absoluteui/components/dashboard';import { enableDashboardBuilder } from '@absoluteui/components/dashboard/builder';import { registerBuiltInWidgets } from '@absoluteui/components/dashboard/widgets';import { action, annotate, createShowcase, hostIn, section, wait } from './kit.js';
const sc = createShowcase({ title: 'Configurable dashboard', description: 'Switch on Edit dashboard in its toolbar, then move widgets (drag or keyboard), add one with the builder, edit the JSON, and undo. The definition below updates on every change.', simulated: true,});
registerBuiltInWidgets();
const SALES: Record<string, { region: string; amount: number }[]> = { all: [{ region: 'Europe', amount: 410 }, { region: 'Asia', amount: 380 }, { region: 'Americas', amount: 520 }], eu: [{ region: 'Europe', amount: 410 }], asia: [{ region: 'Asia', amount: 380 }],};// The simulated API: same-origin URLs answered in the page after a delay.const fetcher: DashboardFetcher = async (request, signal) => { await wait(350, signal); const url = new URL(request.url); const rows = SALES[url.searchParams.get('region') ?? 'all'] ?? []; return { total: rows.reduce((n, r) => n + r.amount, 0), previous: 1180, rows, trend: [210, 240, 260, 250, 300, 320, 330] };};
// The dashboard renders its grid, widgets, and KPI stat cards.const host = annotate(hostIn(sc.stage), ['dashboard', 'dashboard-grid', 'dashboard-widget', 'stat-card']);const dashboard = Dashboard.create(host, { fetcher, editable: true, headingLevel: 2, definition: { schemaVersion: 1, id: 'sales', title: 'Sales', pages: [{ id: 'overview', title: 'Overview' }, { id: 'notes', title: 'Notes' }], variables: [{ id: 'region', kind: 'select', label: 'Region', options: [{ value: 'all', label: 'All regions' }, { value: 'eu', label: 'Europe' }, { value: 'asia', label: 'Asia' }] }], dataSources: { sales: { url: '/api/sales', params: { region: '{{region}}' }, ttl: 30 }, // The same endpoint, narrowed to its rows with a JSON Pointer, so transforms work on the array. regionRows: { url: '/api/sales', params: { region: '{{region}}' }, select: '/rows', ttl: 30 }, goal: { kind: 'static', data: { done: 72 } }, }, widgets: [ { id: 'total', type: 'kpi', title: 'Revenue', page: 'overview', source: 'sales', map: { value: '/total', previous: '/previous', trend: '/trend' }, options: { format: { style: 'currency', currency: 'EUR', notation: 'compact' }, comparisonLabel: 'vs last quarter' }, actions: { refreshable: true }, layout: { x: 0, y: 0, w: 4, h: 3 } }, { id: 'goal', type: 'progress', title: 'Quarter goal', page: 'overview', source: 'goal', map: { value: '/done' }, options: { thresholds: [{ below: 50, tone: 'warning' }] }, layout: { x: 4, y: 0, w: 4, h: 2 } }, { id: 'regions', type: 'list', title: 'Regions', page: 'overview', source: 'regionRows', transforms: [{ op: 'sort', field: 'amount', direction: 'desc' }], options: { label: 'region', value: 'amount' }, actions: { removable: true }, layout: { x: 8, y: 0, w: 4, h: 3 } }, { id: 'by-region', type: 'bar-chart', title: 'Revenue by region', page: 'overview', source: 'sales', map: { rows: '/rows' }, options: { category: 'region', series: [{ field: 'amount', label: 'Revenue' }] }, actions: { maximizable: true }, layout: { x: 0, y: 3, w: 8, h: 4 } }, { id: 'note', type: 'text', title: 'Note', page: 'notes', options: { text: 'Targets are reviewed monthly.\n\nAsk finance for regional breakdowns.' }, layout: { x: 0, y: 0, w: 6, h: 2 } }, ], },});enableDashboardBuilder(dashboard, { widgetTemplates: [{ id: 'trend', label: 'Revenue trend', description: 'Sparkline of the last seven weeks.', widget: { type: 'sparkline', title: 'Revenue trend', source: 'sales', map: { values: '/trend' } } }],});
const jsonSection = section(sc, 'Definition (JSON)', ['dashboard']);const pre = document.createElement('pre');pre.className = 'sc-json';pre.tabIndex = 0;pre.setAttribute('aria-label', 'Dashboard definition');jsonSection.append(pre);const show = (): void => { pre.textContent = JSON.stringify(dashboard.definition, null, 2);};show();host.addEventListener('aui-dashboard-change', (e) => { show(); sc.log('dashboard change', { reason: (e as CustomEvent<DashboardChangeDetail>).detail.reason });});sc.listen(host, ['aui-mode-change', 'aui-variables-change', 'aui-widget-error', 'aui-page-change'], 'dashboard');
action(sc, 'Kiosk mode (rotate pages)', () => { dashboard.startKiosk({ rotate: 10 });}, ['dashboard']);action(sc, 'Reset to saved', () => { dashboard.reset();}, ['dashboard']);Render a JSON definition with built-in widgets
Section titled “Render a JSON definition with built-in widgets”import { Dashboard } from '@absoluteui/components/dashboard';import { registerBuiltInWidgets } from '@absoluteui/components/dashboard/widgets';
registerBuiltInWidgets();
const host = document.createElement('div');document.body.append(host);
const dashboard = Dashboard.create(host, { definition: { schemaVersion: 1, id: 'sales', title: 'Sales', dataSources: { totals: { kind: 'static', data: { revenue: 125000, previous: 110000, regions: [{ region: 'Europe', amount: 70000 }, { region: 'Americas', amount: 55000 }] } }, }, widgets: [ { id: 'revenue', type: 'kpi', title: 'Revenue', source: 'totals', map: { value: '/revenue', previous: '/previous' }, options: { format: { style: 'currency', currency: 'EUR' } }, layout: { x: 0, y: 0, w: 4, h: 2 } }, { id: 'regions', type: 'bar-chart', title: 'By region', source: 'totals', map: { rows: '/regions' }, options: { category: 'region', series: [{ field: 'amount', label: 'Revenue' }] }, layout: { x: 4, y: 0, w: 8, h: 4 } }, ], },});console.log(dashboard.definition.widgets.length);Widgets from your API: the host fetcher adds authentication; other origins must be allow-listed
Section titled “Widgets from your API: the host fetcher adds authentication; other origins must be allow-listed”import { Dashboard, DashboardDataError, type DashboardFetcher } from '@absoluteui/components/dashboard';import { registerBuiltInWidgets } from '@absoluteui/components/dashboard/widgets';
registerBuiltInWidgets();
declare function getAccessToken(): Promise<string>;
const fetcher: DashboardFetcher = async (request, signal) => { const response = await fetch(request.url, { method: request.method, headers: { ...request.headers, Accept: 'application/json', Authorization: `Bearer ${await getAccessToken()}` }, body: request.body ?? null, credentials: request.credentials, redirect: 'error', signal, }); if (!response.ok) throw new DashboardDataError('http', 'Request failed', response.status); return response.json() as Promise<unknown>;};
const host = document.createElement('div');document.body.append(host);Dashboard.create(host, { fetcher, allowedOrigins: ['https://api.example.com'], timeZone: 'Europe/Berlin', definition: { schemaVersion: 1, id: 'ops', title: 'Operations', variables: [{ id: 'period', kind: 'dateRange', label: 'Period', default: { preset: 'thisMonth' } }], dataSources: { tickets: { url: 'https://api.example.com/tickets/summary', params: { from: '{{period.from}}', to: '{{period.to}}' }, ttl: 60, refresh: 300 }, }, widgets: [{ id: 'open', type: 'kpi', title: 'Open tickets', source: 'tickets', map: { value: '/open', trend: '/daily' }, actions: { refreshable: true }, layout: { x: 0, y: 0, w: 3, h: 2 } }], },});Editable dashboard: store every change, the builder, and templates
Section titled “Editable dashboard: store every change, the builder, and templates”import { Dashboard, type DashboardChangeDetail } from '@absoluteui/components/dashboard';import { enableDashboardBuilder } from '@absoluteui/components/dashboard/builder';import { registerBuiltInWidgets } from '@absoluteui/components/dashboard/widgets';
registerBuiltInWidgets();
const host = document.createElement('div');document.body.append(host);const saved = localStorage.getItem('dashboard:home');const dashboard = Dashboard.create(host, { editable: true, definition: saved === null ? { schemaVersion: 1, id: 'home', title: 'Home', widgets: [] } : (JSON.parse(saved) as unknown),});enableDashboardBuilder(dashboard, { widgetTemplates: [{ id: 'note', label: 'Note', widget: { type: 'text', title: 'Note', options: { text: 'Write here.' } } }],});host.addEventListener('aui-dashboard-change', (event) => { const { definition } = (event as CustomEvent<DashboardChangeDetail>).detail; localStorage.setItem('dashboard:home', JSON.stringify(definition)); dashboard.markSaved();});A custom widget type registered in code
Section titled “A custom widget type registered in code”import { registerWidgetType, type WidgetType } from '@absoluteui/components/dashboard';
const statusWidget: WidgetType = { label: 'Status', description: 'Service status text.', defaultSize: { w: 3, h: 2 }, inputs: [{ name: 'status', label: 'Status', kind: 'text', required: true }], checkOptions: (options) => (Object.keys(options).length === 0 ? [] : [{ path: '', expected: 'no options' }]), create: (context) => ({ update: ({ inputs }) => { context.body.textContent = typeof inputs['status'] === 'string' ? inputs['status'] : 'Unknown'; }, destroy: () => { context.body.replaceChildren(); }, }),};registerWidgetType('acme:status', statusWidget);Validate a stored definition before saving it
Section titled “Validate a stored definition before saving it”import { checkDefinition, migrateDefinition } from '@absoluteui/components/dashboard';import { definitionSchema } from '@absoluteui/components/dashboard/schema';
const candidate: unknown = JSON.parse('{"schemaVersion":1,"id":"x","title":"X","widgets":[]}');const result = checkDefinition(migrateDefinition(candidate));if (!result.ok) for (const issue of result.issues) console.warn(issue.path, issue.expected);console.log(JSON.stringify(definitionSchema({ widgetTypes: ['kpi', 'text'] })).length);Load every widget immediately and keep 200 undo steps
Section titled “Load every widget immediately and keep 200 undo steps”import { configureAbsoluteUI } from '@absoluteui/core';
configureAbsoluteUI({ components: { dashboard: { lazy: false, historyLimit: 200 } } });Install and start
Section titled “Install and start”npm install @absoluteui/components @absoluteui/core @absoluteui/themeRegistry setup, the theme stylesheet, and the Content Security Policy are covered in Installation.
import { Dashboard, checkDefinition, type DashboardDefinition } from '@absoluteui/components/dashboard';import { registerBuiltInWidgets } from '@absoluteui/components/dashboard/widgets';import { enableDashboardBuilder } from '@absoluteui/components/dashboard/builder';import '@absoluteui/components/dashboard/style.css';import '@absoluteui/components/dashboard-grid/style.css';import '@absoluteui/components/dashboard-widget/style.css';import '@absoluteui/components/button/style.css';import '@absoluteui/components/switch/style.css';import '@absoluteui/components/select/style.css';import '@absoluteui/components/multi-select/style.css';import '@absoluteui/components/text-input/style.css';import '@absoluteui/components/number-input/style.css';import '@absoluteui/components/date-input/style.css';import '@absoluteui/components/calendar/style.css';import '@absoluteui/components/date-range-picker/style.css';import '@absoluteui/components/tabs/style.css';First use
Section titled “First use”<div id="dashboard"></div><script type="module"> import { Dashboard } from '@absoluteui/components/dashboard'; import { registerBuiltInWidgets } from '@absoluteui/components/dashboard/widgets'; registerBuiltInWidgets(); const definition = await (await fetch('/api/dashboards/home')).json(); const dashboard = Dashboard.create(document.getElementById('dashboard'), { definition, editable: true }); dashboard.host.addEventListener('aui-dashboard-change', (e) => { fetch('/api/dashboards/home', { method: 'PUT', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(e.detail.definition) }); });</script>More usage
import { Dashboard } from '@absoluteui/components/dashboard';import { registerBuiltInWidgets } from '@absoluteui/components/dashboard/widgets';import { enableDashboardBuilder } from '@absoluteui/components/dashboard/builder';
registerBuiltInWidgets();const host = document.createElement('div');document.body.append(host);const dashboard = Dashboard.create(host, { editable: true, definition: { schemaVersion: 1, id: 'home', title: 'Home', widgets: [{ id: 'note', type: 'text', title: 'Welcome', options: { text: 'Hello.' }, layout: { x: 0, y: 0, w: 4, h: 2 } }] },});enableDashboardBuilder(dashboard);More in metadata/dashboard/examples.json: API data with a host fetcher, saving changes, custom widget types, and validation.
Using Angular? See Dashboard for Angular.
API reference
Section titled “API reference”Factory
Section titled “Factory”Dashboard.create(host: HTMLElement, options: DashboardOptions): DashboardGlobal configuration key: dashboard (see Configuration).
Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
definition |
unknown (DashboardDefinition JSON) |
The dashboard definition (plain JSON). Older schemaVersions are migrated; invalid input throws DASHBOARD_DEFINITION with the first issue’s JSON Pointer. Change it later with setDefinition(). Required. | |
registry |
WidgetRegistry |
Widget types by name. Default: defaultWidgetRegistry (fill it with registerWidgetType or registerBuiltInWidgets). Set at creation only. | |
transforms |
TransformRegistry |
Custom transforms for { op: ‘custom’, name }. Default: defaultTransformRegistry. Set at creation only. | |
fetcher |
DashboardFetcher |
(request, signal) => Promise<unknown>: performs data source requests and owns authentication. Default: defaultFetcher (global fetch, no redirects, JSON only, size-limited). Set at creation only. | |
allowedOrigins |
readonly string[] |
Exact http(s) origins besides the page origin that data sources may call. Invalid entries throw DASHBOARD_OPTIONS. Default: none. Set at creation only. | |
baseUrl |
string |
Base for root-relative data source URLs and the ‘same origin’. Default: location.href. Set at creation only. | |
editable |
boolean |
false |
Whether users may switch to edit mode; false hides the edit switch and refuses setMode(‘edit’). Set at creation only. |
mode |
'view' | 'edit' |
"view" |
Initial mode; ‘edit’ needs editable: true. Change it with setMode(). Set at creation only. |
toolbar |
boolean | DashboardToolbarOptions |
true |
Show the toolbar; an object turns items off (variables, refresh, edit, undo, reset, add, json, pages). Set at creation only. |
timeZone |
string |
IANA zone for date range presets and the ‘Updated’ time. Default: the runtime zone. Set at creation only. | |
businessCalendars |
Readonly<Record<string, BusinessCalendarEngine>> |
Business calendars by the name date range variables refer to (business-day presets, date range picker). Set at creation only. | |
headingLevel |
2 | 3 | 4 | 5 | 6 |
3 |
Heading level of widget titles. Set at creation only. |
label |
string |
Accessible name of the widget area. Default: ‘{title} widgets’. Set at creation only. | |
lazy |
boolean |
true |
Load a widget’s data only when it comes within 200 px of the viewport (IntersectionObserver). Globally configurable. Set at creation only. |
historyLimit |
number |
100 |
Undo steps (integer 1 to 1000). Globally configurable. Set at creation only. |
retries |
number |
2 |
GET retries on network errors, timeouts, 408, 429, and 5xx, with exponential backoff and jitter (integer 0 to 5). Globally configurable. Set at creation only. |
locale |
string |
"en-US" |
Locale of messages, numbers, and times. Globally configurable. Inherited from common configuration. Set at creation only. |
direction |
'ltr' | 'rtl' |
"ltr" |
Direction of the grid, toolbar, tabs, and drawers. Globally configurable. Inherited from common configuration. Set at creation only. |
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
host |
HTMLElement |
The host element. |
definition |
DashboardDefinition |
Current validated, deeply frozen definition. |
savedDefinition |
DashboardDefinition |
The definition reset() returns to (create time or the last markSaved()). |
dirty |
boolean |
True when definition differs from savedDefinition. |
mode |
'view' | 'edit' |
Current mode. |
editable |
boolean |
The editable option. |
page |
string | null |
Selected page id, or null without pages. |
variables |
Readonly<Record<string, VariableValue>> |
Current variable values (date ranges as { from, to } ISO dates). |
canUndo / canRedo |
boolean |
Whether undo() / redo() would change the definition. |
kiosk |
boolean |
Whether kiosk mode is on. |
grid |
DashboardGrid | null |
The Dashboard Grid of the current page. |
registry |
WidgetRegistry |
The widget registry in use. |
Methods
Section titled “Methods”| Method | Description |
|---|---|
setDefinition(definition: unknown, reason?: DashboardChangeReason): void |
Validate and apply a definition (undoable). Loaded data of unchanged sources is kept. Throws DASHBOARD_DEFINITION when invalid. |
check(definition: unknown): readonly DefinitionIssue[] |
Migrate and validate a candidate definition without applying it. |
markSaved(): void |
Make the current definition the one reset() returns to (call after storing it). |
setMode(mode: 'view' | 'edit'): void |
Switch mode; ‘edit’ needs editable. Emits aui-mode-change. |
setVariable(id: string, value: unknown): boolean |
Validate and set a variable; dependent data sources reload. Returns false for an unknown id or invalid value. |
refresh(source?: string): void |
Reload one data source, or every source used on the current page, bypassing the cache. |
setPage(id: string): void |
Show a page. Emits aui-page-change. |
addWidget(widget: Omit<WidgetDefinition, 'layout'> & { layout?: WidgetLayout }): readonly DefinitionIssue[] |
Add a widget (first free spot with the type’s default size when layout is omitted, on the current page). Returns issues; empty when added. |
updateWidget(id: string, widget: WidgetDefinition): readonly DefinitionIssue[] |
Replace a widget’s definition. Returns issues; empty when applied. |
removeWidget(id: string): boolean |
Remove a widget and its per-breakpoint layout entries. |
undo(): boolean; redo(): boolean |
Step through the definition history (moves, resizes, add, remove, widget and definition changes, reset). |
reset(): void |
Return to savedDefinition (undoable). |
startKiosk(options?: DashboardKioskOptions): void; stopKiosk(): void |
Read-only display without toolbar and tabs; optional page rotation (10 s minimum, pause toggle) and full screen. Emits aui-kiosk-change. |
widgetStatus(id: string): WidgetStatus | undefined |
idle, loading, ready, empty, error, or stale. |
widgetElement(id: string): HTMLElement | undefined |
The widget host ([data-aui-item]) on the current page. |
destroy(): void |
Abort requests, stop timers and kiosk mode, destroy widgets, grid, toolbar, and tabs, and remove the classes it added. |
Events
Section titled “Events”| Event | Detail | Bubbles | Cancelable | Description |
|---|---|---|---|---|
aui-dashboard-change |
DashboardChangeDetail { reason: DashboardChangeReason; definition: DashboardDefinition } |
Yes | No | The definition changed (layout, add, remove, widget, definition, undo, redo, reset, import). Store detail.definition. |
aui-mode-change |
DashboardModeChangeDetail { mode: 'view' | 'edit' } |
Yes | No | The mode changed. |
aui-variables-change |
DashboardVariablesChangeDetail { variables; id: string } |
Yes | No | A variable changed (toolbar control, interaction, or setVariable). |
aui-widget-error |
DashboardWidgetErrorDetail { widget: string; source: string | null; kind: string; status: number | null } |
Yes | No | A widget shows an error: blocked, network, http, timeout, too-large, parse, transform, options, unknown-type, or render. Never contains response bodies. |
aui-widget-select |
DashboardWidgetSelectDetail { widget: string; datum: JsonValue } |
Yes | No | A user selected a row or list item in a widget; the widget’s interactions have set their variables. |
aui-page-change |
{ page: string } |
Yes | No | A different page is shown. |
aui-kiosk-change |
{ kiosk: boolean } |
Yes | No | Kiosk mode started or stopped. |
Content areas
Section titled “Content areas”| Area | Description |
|---|---|
host children |
The dashboard appends its toolbar, page tabs, and grid to the host; leave the host otherwise empty. |
widget body |
Each widget type renders into .aui-dashboard-widget__body through WidgetContext.body; custom types own that element’s children. |
CSS classes
Section titled “CSS classes”All rules live in the aui.components cascade layer, so application styles override them without specificity battles.
| Class | Purpose |
|---|---|
aui-dashboard-root |
Host; modifiers aui-dashboard-root–editing and aui-dashboard-root–kiosk; data-aui-density and data-aui-accent from the definition style. |
aui-dashboard-root__grid | __pages |
Grid host and page tabs host. |
aui-dashboard-toolbar | __variables | __variable | __actions | __button | __edit |
Toolbar parts; data-aui-variable on each variable control. |
aui-dashboard-widget |
Widget host (also aui-widget); data-aui-item, data-aui-status, data-aui-tone, and the style attributes data-aui-accent, -surface, -border, -shadow, -header, -density, -padding. |
aui-dashboard-widget__body | __state | __message | __retry | __footer |
Renderer area, state overlay (role=status, role=alert for errors), retry button, and the ‘Updated’ footer (data-aui-stale when stale). |
aui-dashboard-kiosk |
Kiosk bar with the pause toggle and exit button. |
aui-dashboard-builder | __form | __json | __group | __field | __message |
Builder and JSON editor content inside the Drawer (dashboard/builder). |
aui-dashboard-list | aui-dashboard-text | aui-dashboard-kpi | aui-dashboard-chart | aui-dashboard-table |
Containers of the built-in widget types (dashboard/widgets). |
Icon slots
Section titled “Icon slots”| Slot | Default icon |
|---|---|
toolbar refresh, undo, redo, reset, add, JSON |
refresh, undo, redo, close, plus, code |
widget refresh and edit actions |
refresh, more-horizontal |
kiosk exit |
minimize |
JSON download |
download |
Design tokens
Section titled “Design tokens”Tokens this stylesheet reads (verified in CI). Override them in a theme or with the Theme Designer.
--aui-border-width | --aui-border-width-strong | --aui-color-bg | --aui-color-border | --aui-color-border-strong | --aui-color-chart-1 | --aui-color-chart-2 | --aui-color-chart-3 | --aui-color-chart-4 | --aui-color-chart-5 | --aui-color-chart-6 | --aui-color-chart-7 | --aui-color-chart-8 | --aui-color-error-fg | --aui-color-focus-ring | --aui-color-hover | --aui-color-info-fg | --aui-color-link | --aui-color-primary | --aui-color-success-fg | --aui-color-surface | --aui-color-surface-sunken | --aui-color-text | --aui-color-text-muted | --aui-color-warning-fg | --aui-focus-ring-offset | --aui-focus-ring-width | --aui-font-family-sans | --aui-font-size-sm | --aui-font-size-xs | --aui-font-weight-semibold | --aui-line-height-relaxed | --aui-radius-md | --aui-shadow-md | --aui-space-1 | --aui-space-2 | --aui-space-3 | --aui-space-4 | --aui-space-5 | --aui-space-6 | --aui-touch-target-min
TypeScript definitions
interface DashboardOptions extends Partial<DashboardConfig> { definition: unknown; registry?: WidgetRegistry; transforms?: TransformRegistry; fetcher?: DashboardFetcher; allowedOrigins?: readonly string[]; baseUrl?: string; editable?: boolean; mode?: 'view' | 'edit'; toolbar?: boolean | DashboardToolbarOptions; timeZone?: string; businessCalendars?: Readonly<Record<string, BusinessCalendarEngine>>; headingLevel?: 2 | 3 | 4 | 5 | 6; label?: string; locale?: string; direction?: Direction;}type DashboardFetcher = (request: DashboardRequest, signal: AbortSignal) => Promise<unknown>;interface WidgetType { readonly label: string; readonly defaultSize: { readonly w: number; readonly h: number }; readonly inputs?: readonly WidgetInputSpec[]; readonly optionFields?: readonly WidgetOptionSpec[]; checkOptions?(options: JsonObject): readonly WidgetOptionIssue[]; create(context: WidgetContext): WidgetInstance;}Accessibility and performance
Section titled “Accessibility and performance”Accessibility
Section titled “Accessibility”Pattern: Composition: a group of toolbar controls (native controls of the AbsoluteUI components), optional WAI-ARIA APG Tabs for pages, and a labelled region of widgets (Dashboard Grid) whose widgets are labelled regions (Dashboard Widget). Editing uses the Dashboard Grid move handles; the builder is an APG modal Dialog (Drawer).
Checked on every docs build: the showcase passes axe (WCAG 2.2 A and AA rules) in the default, dark, and high-contrast themes and right to left; the playground loads without errors and passes axe before and after every on/off option is switched, with no Content Security Policy violations.
Keyboard
Section titled “Keyboard”| Key | Context | Action |
|---|---|---|
| Tab / Shift+Tab | Any | Moves through toolbar controls, page tabs, and widgets in reading order (the grid keeps DOM order equal to visual order). |
| Arrow keys | Page tabs | Move between pages (Tabs, automatic activation). |
| Enter, arrows, Shift+arrows, Escape | Move handle (edit mode) | Grab, move, resize, drop, or cancel a widget (Dashboard Grid); moves are announced. |
| Ctrl/Cmd+Z, Ctrl/Cmd+Shift+Z, Ctrl/Cmd+Y | Edit mode, focus outside text fields | Undo or redo the last definition change. |
| Space | Edit switch | Switches between view and edit mode. |
| Escape | Builder or JSON editor | Closes the drawer without saving (Drawer). |
| Element | Role |
|---|---|
| toolbar | group, named ‘{title} controls’ |
| page tabs | tablist / tab / tabpanel (Tabs); the grid is inside the selected tabpanel |
| widget area | region, named by the label option or ‘{title} widgets’ |
| widget | region named by its title (Dashboard Widget) |
| widget state | status for loading and empty, alert for errors |
| edit switch | switch (Switch) |
| kiosk pause | button with aria-pressed (toggle) |
ARIA attributes
Section titled “ARIA attributes”| Attribute | Element | Value |
|---|---|---|
aria-label |
toolbar | ‘{title} controls’ |
aria-busy |
widget | “true” while its data loads |
aria-pressed |
kiosk pause button | “true” while rotation is paused |
aria-label |
widget actions | ‘Refresh {title}’, ‘Edit {title}’, and the Dashboard Widget actions |
Toolbar and widget controls use the components’ focus rings. Focus stays on the move handle after a keyboard drop and on the toolbar button after undo and redo. Opening the builder moves focus into the drawer; closing returns it to the opener.
WCAG 2.2 success criteria addressed
Section titled “WCAG 2.2 success criteria addressed”Automated test results: Accessibility and compliance.
Notes and known caveats
Section titled “Notes and known caveats”- Every drag has a keyboard alternative (WCAG 2.5.7): move handles and Shift+arrow resizing.
- Kiosk rotation can be paused with a visible toggle button and holds while keyboard focus is inside the dashboard (WCAG 2.2.2).
- Loading and empty states are announced politely; errors use role=alert and offer a retry button when retrying can help.
- Threshold tones are a border color; the value and its label carry the meaning (WCAG 1.4.1).
- Hiding a widget header keeps the title for assistive technology.
- Manual screen-reader verification (NVDA, JAWS, VoiceOver) is pending.
- Many widgets create many region landmarks.
- Pointer drops are announced only when they change the layout.
Performance
Section titled “Performance”| Import cost | Minified | gzip | brotli | CSS brotli |
|---|---|---|---|---|
| `import { Dashboard, checkDefinition, type DashboardDefinition } from ‘@absoluteui/components/dashboard’; | ||||
| import { registerBuiltInWidgets } from ‘@absoluteui/components/dashboard/widgets’; | ||||
| import { enableDashboardBuilder } from ‘@absoluteui/components/dashboard/builder’;` | 255.2 kB | 77.8 kB | 66.6 kB | 1.4 kB |
Measured at build time, including every AbsoluteUI module the component pulls in. No third-party runtime dependencies.
| Budget (enforced in CI) | Limit |
|---|---|
| dashboard core bundle (Dashboard with grid, widgets, toolbar controls) | <= 260 KiB minified (check:treeshake) |
| built-in widgets bundle (dashboard/widgets) | <= 230 KiB minified (check:treeshake) |
| definition checks only (checkDefinition) | <= 25 KiB minified (check:treeshake) |
Tested scale: Definitions up to the validation limits (200 widgets, 100 data sources, 50 variables, 20 pages); behavior tests use 1 to 3 widgets per page; Dashboard Grid budgets cover 50 items.
Bundles (minified, check:treeshake): dashboard core 255 KiB (grid, widgets, toolbar controls including the date range picker), built-in widgets 226 KiB, checkDefinition alone 24 KiB. Requests are shared per source, cached for ttl, aborted when superseded, retried with backoff for GET, and refreshed only while the page is visible. Layout-only changes skip re-rendering; other changes re-render with the data already loaded.
Measured run times: Performance.
Details
Section titled “Details”States
Dashboard: view, edit, kiosk; page selected; rotation paused. Widget: idle (not yet visible), loading, ready, empty, error (retry unless blocked), stale (last data kept after a failed refresh, footer says so).
State transitions
- view to edit: the edit switch or
setMode('edit')(needseditable); move handles, remove buttons, and edit actions appear. Edit to view hides them. - idle to loading: the widget scrolls within 200 px of the viewport (or immediately with
lazy: false); loading to ready, empty, or error when its source settles. - ready to stale: a refresh fails while earlier data exists; stale to ready on the next success.
- Any mode to kiosk:
startKiosk()(switches to view);stopKiosk()or the exit button ends it.
Accessibility notes
- Every drag has a keyboard alternative (WCAG 2.5.7); keyboard moves are announced, and pointer drops are announced when they change the layout.
- Kiosk rotation can be paused and holds while focus is inside the dashboard (WCAG 2.2.2).
- Threshold tones add a border; the value text carries the meaning (WCAG 1.4.1).
- A hidden widget header keeps the title for assistive technology.
- Manual screen-reader verification (NVDA, JAWS, VoiceOver) is pending.
Responsive behavior
Breakpoints come from the definition (default lg 1024 px / 12 columns, md 640 px / 6, sm 0 / 1); narrower layouts are derived unless stored in layouts. The toolbar wraps; widgets load lazily. Dragging near the top or bottom edge auto-scrolls the page or the nearest scroll container.
Right-to-left
Logical properties throughout. The grid mirrors columns and keyboard moves; toolbar, tabs, and drawers follow direction or the document direction.
Theming
Theme tokens only. Definitions pick accent roles, surfaces, borders, shadows, density (data-aui-density on the root or a widget), and padding steps; never CSS values. Forced colors draw the accent strip in CanvasText. Print hides controls and avoids breaking widgets across pages.
Global configuration
configureAbsoluteUI({ components: { dashboard: { lazy: false, historyLimit: 200, retries: 1 } } });locale and direction come from the common configuration.
Component configuration
Per instance through the create options; global defaults through dashboard (lazy, historyLimit, retries). Widget types, transforms, fetcher, allowed origins, and business calendars are per instance (or the default registries).
Timezones
Date range presets (today, yesterday, last 7 and 30 days, this and last week, month, quarter, year, year to date, last 5 and 20 business days) resolve in timeZone. Business-day presets use the variable’s business calendar (Monday to Friday without one), so weekends and holidays are skipped. Values are inclusive ISO dates passed as {{variable.from}} and {{variable.to}}.
Icons
Toolbar: refresh, undo, redo, close (reset), plus (add), code (JSON). Widget actions: refresh, more-horizontal (edit). Kiosk exit: minimize. JSON download: download. Replace them through the icon registry (registerIcons).
Security
- Definitions are untrusted: closed objects, plain JSON values only, depth and size limits, no
__proto__,prototype, orconstructorkeys or pointer tokens. Issues never echo received values. - Data source URLs: absolute http(s) or root-relative, no user info, no placeholders. Requests go only to the page origin or
allowedOrigins;credentials: 'include'only to those. - Definitions cannot set
Authorization,Cookie,Host,Origin,Referer,Proxy-*, orSec-*headers: authentication belongs to the fetcher, so tokens never live in JSON. - The default fetcher refuses redirects, accepts JSON only, enforces
maxBytes(default 5 MiB) andtimeout(default 30 s), and strips unsafe keys. - Text renders with
textContent; style options map to tokens; no HTML sinks. JSON imports are limited to 1 MB. - Validate stored definitions on your server too, and add a CSP
connect-srcentry for every allowed origin.
Data handling
No persistence or telemetry. Responses are cached in memory per source for its ttl and shared by widgets; nothing goes to storage. The host stores definitions. Variable values are sent only as data source parameters.
Supported data scale
Validation limits: 200 widgets, 100 data sources, 50 variables, 20 pages, 8 breakpoints, 20 transforms per widget, 10,000 JSON values per embedded value. Dashboard Grid budgets cover 50 items per page. Tables page their rows; lists show the first 100.
Edge cases
- A widget whose type is not registered shows “Unknown widget type”; invalid options show the first option path.
- Data that does not fit a transform shows “The data does not fit this widget”.
- Empty arrays,
null, or mapped inputs that are all missing show “No data”. - A blocked origin shows an error without a retry button.
- Changing a variable aborts the previous request of each dependent source (latest wins).
- Removing the selected page’s last widget keeps the page; deleting a page in JSON selects the first page.
Errors
Invalid definitions throw AbsoluteUIError DASHBOARD_DEFINITION (validation category; property is the first issue’s JSON Pointer) or DASHBOARD_DEFINITION_VERSION. Invalid options throw DASHBOARD_OPTIONS; invalid widget type registrations throw DASHBOARD_WIDGET_TYPE. Runtime data failures never throw: they become widget states and aui-widget-error events with a kind (blocked, network, http, timeout, too-large, parse, transform, options, unknown-type, render).
Known limitations
- Chart widgets do not emit point selections; interactions work from list, table, and custom widgets.
- Other charts and the Data Grid need a custom widget type.
- No dashboard PNG or PDF export (charts keep their own export).
- Variable values and page selection are not part of the undo history.
- The builder form covers common fields; transforms, interactions, and thresholds are edited in its JSON tab.
- Kiosk full screen needs a user gesture.
Unsupported scenarios
Code, expressions, HTML, or CSS in definitions; requests outside the allowed origins; credentials in JSON; dragging widgets between pages or dashboards; horizontal compaction.
(c) 2026 Kasadara Technology Solutions Pvt Ltd. AbsoluteUI is free to use under the AbsoluteUI Free Use License; it is not open source.