Dashboard design

From markerikson/opencode-config-example · View interactive version

Dashboard design is an AI agent skill from the GitHub repository markerikson/opencode-config-example. Design patterns for data-dense dashboard UIs with dark themes. Use when building tables, charts, status panels, and data visualization components. Focuses on readability, information density, and consistent design systems.

How to use this skill

Skill file

Dashboard Design Patterns

Focused design guidance for data-dense dashboard UIs — trading dashboards, analytics panels, code review tools, monitoring interfaces. Complements general frontend design skills with patterns specific to tabular data, charts, status indicators, and dark-theme-first development.


Data Tables

Numeric Formatting

Column Layout

Row Differentiation

Sortable Columns

Empty & Missing Data


Color System for Dashboards

Semantic Color Tokens

Define strict semantic tokens and enforce their usage:

:root {
  /* Directional (P&L, change, delta) */
  --color-positive: /* green */;
  --color-negative: /* red */;
  --color-neutral: /* gray */;

  /* Status */
  --color-warning: /* amber */;
  --color-info: /* blue */;

  /* UI */
  --color-accent: /* primary brand color */;
  --color-text-primary: /* high contrast text */;
  --color-text-secondary: /* medium contrast — MUST pass 4.5:1 */;
  --color-text-tertiary: /* low contrast — labels, captions — MUST pass 3:1 */;
}

Color Discipline

Surface Elevation (Dark Themes)

Define 2-3 elevation levels with subtle lightness steps:

:root {
  --surface-0: hsl(220 20% 8%);   /* page background */
  --surface-1: hsl(220 18% 11%);  /* cards, panels */
  --surface-2: hsl(220 16% 14%);  /* elevated: dropdowns, popovers */
  --surface-3: hsl(220 14% 18%);  /* highest: modals, dialogs */
}

Typography for Data

Font Choices by Context

Hierarchy in Table Cells

Label + Value Pattern

For key-value displays (detail panels, summary cards):

Muted small label
PROMINENT VALUE

The label is --color-text-tertiary at smaller size; the value is --color-text-primary at larger/bolder size.

Size Minimums


Status & State Indicators

Badge Design

Active/Enabled States

Stale/Aging Indicators

Scores & Ratings


Empty States

Be Specific, Not Lazy

Visual Structure

Distinguish Empty Reasons

Four completely different states that all look like "nothing here":

  1. No data exists — "No signals yet" + explanation of when they'll appear
  2. Loading — skeleton rows, shimmer animation
  3. Error — error message with retry action
  4. Filtered to nothing — "No results match your filters" + clear-filters button

Never conflate these. Each needs distinct visual treatment and copy.


CSS Modules Conventions

Token-First Architecture

Component-Scoped Overrides

/* In component.module.css */
.panel {
  --panel-padding: var(--space-md);
  --panel-bg: var(--surface-1);
  padding: var(--panel-padding);
  background: var(--panel-bg);
}

.panel.compact {
  --panel-padding: var(--space-sm);
}

Naming Conventions


Dark Theme Specifics

Foundation

Typography Adjustments

Borders & Dividers

Accent Colors


Slide-Out Panels

Dimensions

Behavior

Transitions


Charts

Color Usage

Axis Formatting

Legends & Labels

Dark Theme Charts


Quick Reference: CSS Custom Property Naming

:root {
  /* Colors */
  --color-text-primary: ...;
  --color-text-secondary: ...;
  --color-text-tertiary: ...;
  --color-positive: ...;
  --color-negative: ...;
  --color-warning: ...;
  --color-info: ...;
  --color-accent: ...;

  /* Surfaces */
  --surface-0: ...;  /* page bg */
  --surface-1: ...;  /* cards */
  --surface-2: ...;  /* elevated */

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Typography */
  --font-body: ...;
  --font-mono: ...;
  --text-xs: 0.6875rem;   /* 11px */
  --text-sm: 0.8125rem;   /* 13px */
  --text-base: 0.875rem;  /* 14px — dashboard base */
  --text-lg: 1rem;        /* 16px */
  --text-xl: 1.25rem;     /* 20px */

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-default: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  /* Transitions */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
}
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.