Best For
仪表盘 / 数据 / 面板
Dashboard Layout
A data-driven dashboard layout featuring side navigation, top toolbar, multi-module data panels, and chart areas -- ideal for admin systems, data analytics platforms, and monitoring dashboards.
Best For
仪表盘 / 数据 / 面板
Primary Move
Use dark side navigation bar bg-gray-900 w-64
Watch Out
Do not allow disproportionate sidebar-to-content ratios
Showcase Entry
Live preview of the showcase page. Click to explore the full experience.
Color Palette
Primary
#111827
Secondary
#f9fafb
Accent 1
#6366f1
Accent 2
#10b981
AI Implementation
Use the Hard Prompt by default to generate UI. Use the Design Spec to understand, modify, and review the style. Use the Creative Brief for early exploration.
Use this by default: copy it, append the concrete requirement, and let AI generate consistent production UI.
When to use
How to use
STYLEKIT_STYLE_REFERENCE
style_name: Dashboard Layout
style_slug: dashboard-layout
style_source: /styles/dashboard-layout
# Hard Prompt
## When To Use
Use this when you want AI to generate code with strict style consistency. It is the safest default for production UI.
## How To Use
- Copy the full prompt into ChatGPT, Claude, Cursor, or another coding assistant.
- Append the concrete product/page requirement after the prompt.
- After generation, check the forbidden rules and interaction states before accepting the output.
Strictly follow the style rules below and maintain consistency. No style drift allowed.
## Requirements
- Prioritize style consistency first, then creative extension.
- When conflicts arise, treat prohibitions as the highest priority.
- Self-check before output: verify colors, typography, spacing, and interactions still match this style.
## Style Rules
You are a Dashboard Layout expert. All generated code must strictly follow these constraints:
## Layout Structure
- Left: Dark side navigation bar w-64 bg-gray-900
- Top: White toolbar (search, notifications, user)
- Main: KPI cards + chart panels + data tables
## KPI Cards
- Use grid grid-cols-4 layout
- Each card includes: label, value, trend change
- Growth uses green text-green-500
- Decline uses red text-red-500
- Stable uses yellow text-yellow-500
## Chart Area
- Main chart takes 2/3 width col-span-2
- Secondary chart takes 1/3 width
- Use aspect-ratio to maintain proportions
## Side Navigation
- Dark background bg-gray-900
- Current page highlighted bg-white/10
- Icon + text menu items
- User info at bottom
## Responsive
Large screens: Sidebar + 4-column KPI + charts
Medium screens: Sidebar + 2-column KPI
Small screens: Hidden sidebar + 1-column KPI
## Self-check
1. Side navigation is dark and fixed
2. KPI card data is clear
3. Chart area proportions are appropriate
4. Status color coding is correct
5. Responsive adaptation is complete
## Animation & Interaction Rules
- Crisp SaaS Feel: All micro-interactions should be fast and clear, preferring `duration-150` + `ease-out`.
- KPI Focus: KPI cards may slightly lift on hover, using `group-hover` to micro-scale or recolor the core number for visual focus.
- Hover Hinting: Data cards, data rows, and actionable panels must provide clear background feedback on hover (e.g., `hover:bg-gray-50`).
- Action Precision: Button clicks should have clear press feedback (e.g., `active:scale-[0.97]`), with visible focus ring for a11y.Component Templates
仪表盘中的操作按钮
Frontend Readiness
This layer tracks whether the style is ready for real websites: theme modes, state feedback, keyboard access, and performance constraints.
Overall
76%
Curated
Dark Mode
70%
PartialUI States
100%
CompleteMotion
70%
PartialA11y
70%
PartialPerformance
70%
PartialButton
Default / Hover / Focus Visible / Active / Disabled
Input
Default / Hover / Focus Visible / Disabled / Error
Card
Default / Hover / Focus Visible / Loading / Skeleton
Form
Default / Focus Visible / Disabled / Loading / Error
/* Dashboard Layout 全局样式 */
/* 仪表盘容器 */
.dashboard {
display: flex;
min-height: 100vh;
}
/* 侧边导航 */
.dashboard-sidebar {
width: 256px;
background: #111827;
color: white;
flex-shrink: 0;
display: flex;
flex-direction: column;
}
/* 主区域 */
.dashboard-main {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
}
/* 顶部工具栏 */
.dashboard-toolbar {
background: white;
border-bottom: 1px solid #e5e7eb;
padding: 0.75rem 1.5rem;
display: flex;
align-items: center;
justify-content: space-between;
}
/* 内容区 */
.dashboard-content {
flex: 1;
padding: 1.5rem;
background: #f9fafb;
}
/* KPI 卡片网格 */
.dashboard-kpi-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1rem;
margin-bottom: 1.5rem;
}
/* 图表网格 */
.dashboard-chart-grid {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 1rem;
}
/* KPI 卡片 */
.dashboard-kpi {
background: white;
border-radius: 12px;
padding: 1rem;
border: 1px solid #f3f4f6;
}
/* 状态颜色 */
.dashboard-up { color: #10b981; }
.dashboard-down { color: #ef4444; }
.dashboard-neutral { color: #f59e0b; }
/* 响应式 */
@media (max-width: 1024px) {
.dashboard-kpi-grid {
grid-template-columns: repeat(2, 1fr);
}
.dashboard-chart-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 768px) {
.dashboard-sidebar {
display: none;
}
.dashboard-kpi-grid {
grid-template-columns: 1fr;
}
}
/* Dashboard Layout Design Tokens */
:root {
--dashboard-layout-primary: #111827;
--dashboard-layout-secondary: #f9fafb;
--dashboard-layout-accent: #6366f1;
--dashboard-layout-glow: rgba(17, 24, 39, 0.3);
}
@keyframes dashboard-layout-fade-in {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes dashboard-layout-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.7; }
}
.dashboard-layout-card {
position: relative;
overflow: hidden;
}
.dashboard-layout-card::before {
content: "";
position: absolute;
inset: 0;
opacity: 0;
transition: opacity 0.3s ease;
background: linear-gradient(135deg, rgba(17, 24, 39, 0.05), transparent);
pointer-events: none;
}
.dashboard-layout-card:hover::before {
opacity: 1;
}
.dashboard-layout-gradient {
background: linear-gradient(135deg, #111827, #6366f1);
}
.dashboard-layout-gradient-text {
background: linear-gradient(135deg, #111827, #6366f1);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.dashboard-layout-frosted {
backdrop-filter: blur(12px) saturate(180%);
-webkit-backdrop-filter: blur(12px) saturate(180%);
background: rgba(17, 24, 39, 0.08);
}
.dashboard-layout-accent-corner {
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2rem), calc(100% - 2rem) 100%, 0 100%);
}
.dashboard-layout-animate-in {
animation: dashboard-layout-fade-in 0.5s ease-out both;
}Compatible Visual Styles
仪表盘布局 is a layout pattern that can be paired with the following visual styles.
IDE Integration
Download configuration files for AI coding assistants to generate code in this style.
Style Pack
Get complete machine-readable style assets including design tokens, Tailwind presets, CSS variables, and shadcn/ui themes.
Metadata
Style metadata including version information
Design Tokens
Compatible with Figma / Style Dictionary / Tokens Studio
Tailwind Preset
Tailwind CSS theme preset, import directly in config
Global CSS
CSS variables and base styles
shadcn Theme
shadcn/ui theme configuration
CSS Variables
Pure CSS variables, works with any project
SKILL.md
Loadable skill pack for Cursor / Claude Code / VS Code
Dashboard Layout is a layout solution centered on data presentation, enabling users to efficiently monitor and analyze multi-dimensional data through side navigation, multi-module data panels, and a flexible grid system.
WCAG 2.1 compliance analysis based on color contrast and typography readability.
Overall Score
Grade: D - Poor
Contrast Ratios
| Context | Colors | Ratio | AA | AAA |
|---|---|---|---|---|
| Text on background | /#111827 / #f9fafb | 16.98:1 | ||
| Secondary text on background | /#6b7280 / #f9fafb | 4.63:1 | ||
| Muted text on background | /#9ca3af / #f9fafb | 2.43:1 | ||
| Text on secondary background | /#111827 / #ffffff | 17.74:1 | ||
| Secondary text on secondary | /#6b7280 / #ffffff | 4.83:1 | ||
| Button primary | /#ffffff / #6366f1 | 4.47:1 | ||
| Text on accent 1 | /#111827 / #6366f1 | 3.97:1 | ||
| Alt text on accent 1 | /#6b7280 / #6366f1 | 1.08:1 | ||
| Text on accent 2 | /#111827 / #10b981 | 6.99:1 | ||
| Alt text on accent 2 | /#6b7280 / #10b981 | 1.91:1 | ||
| Text on accent 3 | /#111827 / #f59e0b | 8.26:1 | ||
| Alt text on accent 3 | /#6b7280 / #f59e0b | 2.25:1 | ||
| Text on accent 4 | /#111827 / #ef4444 | 4.71:1 | ||
| Alt text on accent 4 | /#6b7280 / #ef4444 | 1.28:1 |
Readability
Score
58/100
Font Size
text-sm
Font Weight
font-semibold tracking-tight
Line Height
default
Scoring is based on WCAG 2.1 standards. AA requires 4.5:1 contrast for normal text, 3:1 for large text; AAA requires 7:1 for normal text, 4.5:1 for large text.
Design Recipes
These curated recipes combine this style with layouts and animations, optimized for specific use cases.