Best For
data dense / high density ui / compact ui
数据密集
Rate this styleHigh-density admin panel style with compact spacing and small components. Prioritizes data tables and operational efficiency.
Best For
data dense / high density ui / compact ui
Primary Move
Use white bg-white with very light blue-gray bg-[#f8fafc] alternating rows
Watch Out
Never use large spacing p-6+ (wastes data display space)
design.md
One document describes the colour roles, type rules, spacing and component construction behind this style. Copy or download it into Claude Code or Codex.
Every pixel carries data: type at 10 to 12px, spacing on a 4px step, no ornament at all.
Theme: light
Data Dense serves an operations desk, so every aesthetic metric is minimised: 10 to 12px type, 28px rows, spacing in 4px steps, 4px radii, no shadow and no gradient. Hierarchy comes from three things only — alternating row grounds (white and a very pale blue-grey), 1px dividers, and the color blocks of status tags. Figures, IDs and code all run monospace and right-align so columns can be compared vertically. The value of this style is the density itself: forty rows per screen instead of twelve. Any change that adds whitespace is a regression.
| Name | Value | Token | Role |
|---|---|---|---|
| White | #ffffff | --color-white | Table and panel ground, forming the lightest separation against the alternating row tone. |
| Row Tint | #f8fafc | --color-row-tint | Alternating rows and header ground — one step off white, felt through repetition rather than contrast. |
| Ink | #1e293b | --color-ink | Primary text and figures — deep slate that stays crisp at dense sizes. |
| Muted | #64748b | --color-muted | Headers, secondary columns and notes, always paired with 10px uppercase. |
| Primary Blue | #3b82f6 | --color-primary-blue | Primary actions, selected rows and focus — the only saturated block allowed in a table. |
| Danger | #ef4444 | --color-danger | Deletion and error states, only on text and 10% ground tags. |
| Success | #22c55e | --color-success | Growth and completion, matched to danger in both area and weight. |
| Role | Family | Weight | Size | Line Height | Letter Spacing | Token |
|---|---|---|---|---|---|---|
| heading | — | 600 | 18px | 1.3 | — | --text-heading |
| body-lg | — | 500 | 14px | 1.45 | — | --text-body-lg |
| body | — | 400 | 12px | 1.45 | — | --text-body |
| body-sm | — | 400 | 11px | 1.4 | — | --text-body-sm |
| label | — | 500 | 10px | 1.3 | 0.06em | --text-label |
Base unit: 4px Density: compact
| Name | Value | Token |
|---|---|---|
| 4 | 4px | --spacing-4 |
| 8 | 8px | --spacing-8 |
| 12 | 12px | --spacing-12 |
| 16 | 16px | --spacing-16 |
| 24 | 24px | --spacing-24 |
| 32 | 32px | --spacing-32 |
| Element | Value |
|---|---|
| cards | 4px |
| buttons | 4px |
| inputs | 4px |
| tags | 4px |
Role: The primary data table
A 1px #e2e8f0 frame, 4px radius, no shadow. The header is 32px tall on #f8fafc with 10px uppercase at 0.06em in grey 500. Rows are 28px with 8px 12px padding, alternating to #f8fafc. Numeric columns run monospace and right-align; the status column holds color tags. Hover tints the whole row #eff6ff over 120ms.
Role: Row actions and toolbar buttons
24px tall, 4px 10px padding, 4px radius, 11px/500, no shadow. Primary actions take a blue fill with white text, secondary actions a white fill with a 1px #e2e8f0 border, destructive actions red text on transparent. Hover changes only the ground, over 120ms.
Role: Top-row stats
White fill, 1px #e2e8f0 border, 4px radius, 10px 12px padding, no shadow. The first line is a 10px uppercase grey label, the second an 18px/600 monospace figure, the third a 10px delta in green or red. Three or more sit in an equal-width row with 12px gaps.
Role: Status and category tags
10px/500 on a 4px radius with 2px 6px padding and no border. In-progress uses a 10% blue ground with blue 700 text, success 10% green, failure 10% red. Color always pairs with a text label, never carrying meaning alone.
Role: Left navigation rail
192px wide on #f8fafc with a 1px #e2e8f0 border on the right and 12px vertical padding. Items are 26px tall on a 4px radius with 12px type and a 14px icon. Selection fills blue with white text; hover gives a white ground with ink text. Group labels sit 12px above at 10px uppercase grey.
| Level | Name | Value | Purpose |
|---|---|---|---|
| 0 | White | #ffffff | 表格与面板 |
| 1 | Row Tint | #f8fafc | 交替行与表头 |
| 2 | Rail | #f8fafc | 左侧导航 |
none — 1px borders onlyAlmost no imagery. Avatars at 20px, icons at 14px and sparklines no taller than 24px are the entire budget. No large images, illustration or background texture — they directly reduce the row count.
A 192px rail beside a content area capped at 1600px with 16px padding. The stat row uses 12px gaps and the table below fills the remaining height. Every gap is a multiple of four, rows are pinned at 28px, and the target is thirty-five rows per screen.
QUICK COLOR REFERENCE:
#1e293b#ffffff#f8fafc#3b82f6#64748b#e2e8f0EXAMPLE COMPONENT PROMPTS:
:root {
/* Colors */
--color-white: #ffffff;
--color-row-tint: #f8fafc;
--color-ink: #1e293b;
--color-muted: #64748b;
--color-primary-blue: #3b82f6;
--color-danger: #ef4444;
--color-success: #22c55e;
/* Typography — Font Families */
--font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
--font-mono: 'JetBrains Mono', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
/* Typography — Scale */
--text-heading: 18px;
--leading-heading: 1.3;
--text-body-lg: 14px;
--leading-body-lg: 1.45;
--text-body: 12px;
--leading-body: 1.45;
--text-body-sm: 11px;
--leading-body-sm: 1.4;
--text-label: 10px;
--leading-label: 1.3;
--tracking-label: 0.06em;
/* Typography — Weights */
--font-weight-regular: 400;
--font-weight-medium: 500;
--font-weight-semibold: 600;
/* Spacing */
--spacing-unit: 4px;
--spacing-4: 4px;
--spacing-8: 8px;
--spacing-12: 12px;
--spacing-16: 16px;
--spacing-24: 24px;
--spacing-32: 32px;
/* Layout */
--page-max-width: 1600px;
--section-gap: 16px;
--card-padding: 12px;
--element-gap: 4px;
--density: compact;
/* Border Radius */
--radius-cards: 4px;
--radius-buttons: 4px;
--radius-inputs: 4px;
--radius-tags: 4px;
/* Surfaces */
--surface-white: #ffffff;
--surface-row-tint: #f8fafc;
--surface-rail: #f8fafc;
}
Component Templates
FAQ
.data-dense-badge {
display: inline-flex;
align-items: center;
padding: 0.125rem 0.375rem;
font-size: 0.625rem;
border-radius: 0.25rem;
font-weight: 500;
}
.data-dense-badge--success { background: #f0fdf4; color: #15803d; }
.data-dense-badge--warning { background: #fffbeb; color: #a16207; }
.data-dense-badge--error { background: #fef2f2; color: #b91c1c; }
.data-dense-badge--info { background: #eff6ff; color: #1d4ed8; }
@keyframes data-dense-fade-in {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes data-dense-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.7; }
}
.data-dense-card {
position: relative;
overflow: hidden;
}
.data-dense-card::before {
content: "";
position: absolute;
inset: 0;
opacity: 0;
transition: opacity 0.3s ease;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
pointer-events: none;
}
.data-dense-card:hover::before {
opacity: 1;
}
.data-dense-gradient {
background: linear-gradient(135deg, #ffffff, #3b82f6);
}
.data-dense-gradient-text {
background: linear-gradient(135deg, #ffffff, #3b82f6);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.data-dense-frosted {
backdrop-filter: blur(12px) saturate(180%);
-webkit-backdrop-filter: blur(12px) saturate(180%);
background: rgba(255, 255, 255, 0.08);
}
.data-dense-accent-corner {
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2rem), calc(100% - 2rem) 100%, 0 100%);
}
.data-dense-animate-in {
animation: data-dense-fade-in 0.5s ease-out both;
}Related Styles
Explore these styles for ready-made tokens and components.
Data Dense and Asymmetric Grid sit closest to each other. The table below gives the real differences in color, use case, and tags, so the choice between them is made on facts.
| Attribute | Data Dense | Asymmetric Grid |
|---|---|---|
| Primary color | #ffffff | #0f0f0f |
| Secondary color | #f8fafc | #ffffff |
| Best for | data dense / high density ui / compact ui | asymmetric grid / broken grid layout / asymmetrical layout |
| Unique tags | — | high-contrast |
Data Dense is an efficiency-first admin interface design language.