Skip to main content

Data Display

Renders structured or aggregated data in a formatted, readable layout for dashboards or reports. Use when data needs to be presented clearly for scanning or analysis. Don't use for simple key-value pairs.

Figma Storybook Docs

Description

What it does

Presents structured datasets, aggregated metrics, or tabular information in a consistent, scannable format. Supports numeric, categorical, and status-based data with clear visual hierarchy.

Where it appears

Dashboard summary panels, report views, stakeholder engagement summaries, consultation response breakdowns, and activity feed analytics in both Open Point and Social Point.

Why it exists

Government users need to quickly assess programme status, response volumes, and engagement metrics without navigating into individual records. A dedicated data display pattern ensures consistent density, labelling, and contrast across product surfaces.

Dependencies

Badge, Progress Bar, Divider, Tag

Anatomy

PartRequired?Notes
Container Required Wraps the entire data display. Sets background (--op-color-bg-primary), border (--op-color-border-default), and radius (--op-radius-md). Provides padding via --op-space-16 or --op-space-24 depending on density variant.
Header row Recommended Contains the dataset title and an optional context label or timestamp. Uses --op-text-sm, --op-color-text-secondary for the label; --op-text-base, --op-color-text-primary for the title.
Data row Required A single labelled data point. Consists of a label cell and a value cell arranged horizontally. Multiple rows stack vertically with --op-space-8 gap.
Label cell Required Describes the data field. Uses --op-text-sm, --op-color-text-secondary, font-weight 500. Truncates with ellipsis at max-width to preserve layout.
Value cell Required Displays the data value. Uses --op-text-sm or --op-text-base depending on emphasis, --op-color-text-primary. May contain inline Badge or Tag for status values.
Divider Optional Separates logical groups of rows. Uses wa-divider with --op-color-border-default. Adds --op-space-12 vertical margin above and below.
Footer row Optional Displays supplementary metadata such as last updated time or data source. Uses --op-text-xs, --op-color-text-tertiary, right-aligned or left-aligned depending on context.
Status indicator Optional An inline Badge or coloured dot used within a value cell to communicate status. Follows the --op-color-status-* token set.

Variants

Summary card

A compact, bordered card surface presenting 3–8 aggregated metrics for a single entity or programme.

Use on dashboard views where a user needs a quick status snapshot — for example, a stakeholder record showing total engagements, last contact date, and assigned team.

Comparison table

A multi-column layout that aligns the same fields across two or more entities side by side.

Use when users need to compare consultation results, stakeholder tiers, or response rates across multiple programmes or time periods.

Metric row

A horizontal strip of headline numbers with supporting labels, typically used at the top of a report or dashboard section.

Use to surface top-level KPIs — for example, total responses received, active consultations, or engagement rate — before a user drills into detail.

Breakdown list

A vertical list of labelled data points with optional progress bars or inline percentages indicating relative proportion.

Use to display categorical breakdowns such as response sentiment distribution, stakeholder group participation, or submission channel split.

States

State Behaviour
Default All data rows are visible. Labels and values render at full opacity with standard contrast.
Loading Skeleton placeholder rows replace label and value cells. Use wa-spinner or CSS shimmer animation. Announce loading state to screen readers via aria-busy='true' on the container.
Empty Container renders with a centred empty-state message: short heading (--op-text-base, --op-color-text-primary) and a supporting sentence (--op-text-sm, --op-color-text-secondary). Do not show zero-filled rows.
Error Container displays an inline error message using --op-color-status-error and --op-color-status-error-bg. Provide a retry action where possible. Do not expose raw API error text to end users.
Stale Data is present but may be outdated. A footer note or badge using --op-color-status-warning indicates the last refresh time. Used when live data polling is unavailable.
Highlighted row A single row is visually emphasised — for example, the highest-value metric or a row with a status requiring action. Background uses --op-color-status-info-bg; border-left 3px solid --op-color-status-info.

Usage guidelines

When to use

  • Displaying aggregated engagement metrics on a stakeholder or consultation record — for example, total submissions, average sentiment score, and response rate.
  • Presenting report summaries that a government programme manager needs to scan before exporting or presenting to stakeholders.
  • Showing a breakdown of consultation responses by category, channel, or demographic group in a dashboard widget.
  • Comparing two or more programme outcomes side by side to support evidence-based decision making.

When not to use

  • Simple key-value metadata (for example, a record's created date or assigned owner) — use a Description List or form read-only field instead.
  • Large datasets with more than 20 rows and sortable or filterable columns — use a Data Table component instead.
  • Purely narrative or prose-based content — use a content block or card with rich text.
  • Real-time streaming data that updates more than once per second — this pattern is not optimised for rapid re-renders.

Do / Don't

Do

Use concise, plain-language labels that a non-technical government stakeholder can understand without explanation.

Don't

Use internal system field names or database column identifiers as labels (for example, 'resp_cnt' instead of 'Total responses').

Do

Group related rows with a divider and a group heading so users can navigate logically through the data.

Don't

Present a flat, undifferentiated list of 15+ rows without visual grouping or hierarchy.

Do

Pair numeric values with units or context labels — for example, '842 responses' rather than just '842'.

Don't

Display bare numbers without units, scale, or reference point.

Do

Use status tokens (--op-color-status-*) consistently for values that carry a status meaning — always paired with a text label, never colour alone.

Don't

Use arbitrary brand colours to encode status, or rely on colour as the sole differentiator between states.

Do

Show an empty state with a helpful message when no data is available yet.

Don't

Render a data display with all zero values or dashes when the dataset is empty — this is misleading and creates unnecessary noise.