Compact Dashboard

Dense controls, lists and styles for admin screens.

Automations

env_…ZK4M8Q2

Workflows running in production.

Environment
Production
Schedule
Hourly, 09:00 to 18:00 UTC
WorkflowStartedStatus
Daily digest09:00Running
Document index08:30Idle
Invoice sync08:00Failed

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/compact-dashboard

Usage

import { Chip, DataTable } from "./ui/uicontext/components/compact-dashboard/collection.ts"
const runs = [{ id: "run_001", title: "Daily digest", status: "Running" }]export const RunsTable = <M>(h: Html.H<M>) =>	DataTable(h, {		label: "Recent runs",		rows: runs,		rowKey: (run) => run.id,		columns: [			{ key: "title", heading: "Workflow", cell: (run) => run.title },			{ key: "status", heading: "Status", cell: (run) => Chip(h, run.status, "green", true) },		],		empty: "No runs yet.",	})

API reference

PageHeaderView function

Options

PageHeader options
NameTypeDescription
idstringThe record's id, shown short under the title with a button that copies it in full

DataTableView function

Options

DataTable options
NameTypeDescription
rowsrequiredRow[]The rows to show, in order
rowKeyrequired(row: Row) => stringA stable key for each row
columnsrequiredColumn<Row, Message>[]Each column's key, heading, cell and optional style
emptyrequiredstringWhat the table says when there are no rows
labelstringWhat the table lists, read as its name: "Recent runs"

Accessibility

  • Tables have a header row with scope="col", and fields tie their label, description and error to the control.

Source