Best For
dashboard / dashboard layout / admin panel
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
dashboard / dashboard layout / admin panel
Primary Move
Use dark side navigation bar bg-gray-900 w-64
Watch Out
Do not allow disproportionate sidebar-to-content ratios
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.
---
# Dashboard Layout Design System
> 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.
## Design Philosophy
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.
Core principles:
- Data first: All layout decisions serve efficient data presentation
- Modular: Each data panel is an independent module that can be flexibly combined
- Density control: Striking a balance between information density and readability
- Real-time: Layout supports real-time data updates and refreshes
---
## Token Dictionary (exact class mapping)
### Border
```
Width: border
Color: border-gray-200
Radius: rounded-xl
```
### Shadow
```
sm: shadow-sm
md: shadow-sm
lg: shadow-md
hover: hover:shadow-md
focus: focus:shadow-sm
```
### Interaction
```
Hover translate: (none)
Hover scale: (none)
Hover opacity: hover:opacity-90
Transition: transition-colors duration-200
Active: active:scale-95
```
### Typefaces
```
Heading: font-semibold tracking-tight
Body: font-sans
Mono: font-mono
```
### Type scale
```
Hero: text-2xl md:text-3xl
H1: text-xl md:text-2xl
H2: text-lg md:text-xl
H3: text-sm md:text-base
Body: text-sm
Small: text-xs
```
### Spacing
```
Section: py-4 md:py-6
Container: px-4 md:px-6
Card: p-4 md:p-6
Gap sm: gap-2 md:gap-3
Gap md: gap-3 md:gap-4
Gap lg: gap-4 md:gap-6
```
### Color roles
```
Background primary: bg-[#f9fafb]
Background secondary: bg-white
Background accent: bg-[#6366f1], bg-[#10b981], bg-[#f59e0b], bg-[#ef4444]
Text primary: text-[#111827]
Text secondary: text-gray-500
Text muted: text-gray-400
Button primary: bg-[#6366f1] text-white
Button secondary: bg-gray-100 text-gray-700
```
---
## [FORBIDDEN]
These classes are banned in this style. Check for them before returning code:
### Banned classes
- `rounded-none`
- `shadow-2xl`
- `font-black`
- `font-extrabold`
- `text-5xl`
- `text-6xl`
- `text-7xl`
- `text-8xl`
- `rounded-3xl`
- `rounded-full`
### Banned patterns
- matches `^rounded-(?:none|3xl|full)`
- matches `^shadow-2xl`
- matches `^text-[5-8]xl`
### Why they are banned
- `rounded-none`: Dashboard Layout uses rounded-xl for a modern data panel aesthetic
- `shadow-2xl`: Dashboard Layout uses minimal shadows to keep data focused
- `text-6xl`: Dashboard Layout uses compact typography for data-dense screens
- `rounded-full`: Dashboard Layout uses consistent rounded-xl panels, not pill shapes
> WARNING: if your code contains any of the above, replace it before shipping.
---
## [REQUIRED]
### Every button must include
```
rounded-lg
font-medium text-sm
transition-colors
```
### Every card must include
```
bg-white
rounded-xl
shadow-sm
border border-gray-100
```
### Every input must include
```
bg-gray-50
border border-gray-200
rounded-lg
text-sm
focus:outline-none
focus:ring-2 focus:ring-[#6366f1]/20 focus:border-[#6366f1]
transition-all
```
---
## [COMPARE] Dashboard Layout wrong vs right
The wrong examples below stand for generic library defaults that were never adapted to this style. Do not read them as visual suggestions.
### Button
[WRONG] **Wrong** (generic component library default, do not copy):
```html
<button class="{GENERIC_LIBRARY_BUTTON_DEFAULT}">
Click me
</button>
```
[CORRECT] **Right** (uses this style's tokens):
```html
<button class="rounded-lg font-medium text-sm transition-colors bg-[#6366f1] text-white">
Click me
</button>
```
### Card
[WRONG] **Wrong** (generic card, not adapted to this style):
```html
<div class="{GENERIC_LIBRARY_CARD_DEFAULT}">
<h3>{TITLE}</h3>
</div>
```
[CORRECT] **Right** (uses this style's card tokens):
```html
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-4 md:p-6">
<h3 class="font-semibold tracking-tight text-sm md:text-base">{TITLE}</h3>
</div>
```
### Input
[WRONG] **Wrong** (generic input, not adapted to this style):
```html
<input class="{GENERIC_LIBRARY_INPUT_DEFAULT}" />
```
[CORRECT] **Right** (uses this style's input tokens):
```html
<input class="bg-gray-50 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-[#6366f1]/20 focus:border-[#6366f1] transition-all" placeholder="{PLACEHOLDER}" />
```
---
## [TEMPLATES] Dashboard Layout page skeletons
These skeletons use this style's tokens only. Replace `{PLACEHOLDER}` values, but keep every token in place:
### Navigation
```html
<nav class="bg-[#f9fafb] text-[#111827] border border-gray-200 px-4 md:px-6">
<div class="flex items-center justify-between max-w-6xl mx-auto gap-3 md:gap-4">
<a href="/" class="font-semibold tracking-tight text-sm md:text-base">
{LOGO_TEXT}
</a>
<div class="flex gap-3 md:gap-4 font-sans text-xs">
{NAV_LINKS}
</div>
</div>
</nav>
```
### Hero section
```html
<section class="bg-[#6366f1] text-[#111827] py-4 md:py-6 px-4 md:px-6">
<div class="max-w-4xl mx-auto">
<h1 class="font-semibold tracking-tight text-2xl md:text-3xl">
{HEADLINE}
</h1>
<p class="font-sans text-sm max-w-xl">
{SUBHEADLINE}
</p>
<button class="rounded-lg font-medium text-sm transition-colors bg-[#6366f1] text-white">
{CTA_TEXT}
</button>
</div>
</section>
```
### Card grid
```html
<section class="bg-[#f9fafb] text-[#111827] py-4 md:py-6 px-4 md:px-6">
<div class="max-w-6xl mx-auto">
<h2 class="font-semibold tracking-tight text-lg md:text-xl">{SECTION_TITLE}</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3 md:gap-4">
<!-- Card template - repeat for each card -->
<div class="bg-white rounded-xl shadow-sm border border-gray-100 p-4 md:p-6">
<h3 class="font-semibold tracking-tight text-sm md:text-base">{CARD_TITLE}</h3>
<p class="font-sans text-sm text-gray-400">{CARD_DESCRIPTION}</p>
</div>
</div>
</div>
</section>
```
### Form input
```html
<input class="bg-gray-50 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-[#6366f1]/20 focus:border-[#6366f1] transition-all" placeholder="{PLACEHOLDER}" />
```
### Footer
```html
<footer class="bg-white text-gray-500 py-4 md:py-6 px-4 md:px-6">
<div class="max-w-6xl mx-auto">
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-6">
<div>
<span class="font-semibold tracking-tight text-sm md:text-base">{LOGO_TEXT}</span>
<p class="font-sans text-xs">{TAGLINE}</p>
</div>
<div>
<h4 class="font-semibold tracking-tight text-sm md:text-base">{COLUMN_TITLE}</h4>
<ul class="font-sans text-xs">
{FOOTER_LINKS}
</ul>
</div>
</div>
</div>
</footer>
```
---
## [CHECKLIST] Dashboard Layout post-generation self check
**Before returning code, verify every token and rule below. Fix any violation before delivering:**
### Token check
- [ ] Button includes: `rounded-lg font-medium text-sm transition-colors`
- [ ] Card includes: `bg-white rounded-xl shadow-sm border border-gray-100`
- [ ] Input includes: `bg-gray-50 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-[#6366f1]/20 focus:border-[#6366f1] transition-all`
### Forbidden check
- [ ] Not using `rounded-none`
- [ ] Not using `shadow-2xl`
- [ ] Not using `font-black`
- [ ] Not using `font-extrabold`
- [ ] Not using `text-5xl`
- [ ] Not using `text-6xl`
- [ ] Not using `text-7xl`
- [ ] Not using `text-8xl`
### Style rule check
- [ ] Use dark side navigation bar bg-gray-900 w-64
- [ ] Top toolbar includes search, notifications, and user info
- [ ] Use CSS Grid for data panels grid grid-cols-4
- [ ] KPI cards use large font numbers to display key metrics
- [ ] Chart areas use appropriate ratios aspect-video or aspect-square
### Style drift check
- [ ] Does not violate: Do not allow disproportionate sidebar-to-content ratios
- [ ] Does not violate: Do not use inconsistent spacing between data panels
- [ ] Does not violate: Do not ignore loading states and empty states
- [ ] Does not violate: Do not make all panels exactly the same size
- [ ] Does not violate: Do not use excessive decorative elements that distract attention
### Delivery check
- [ ] Responsive layout holds on phone, tablet and desktop with no horizontal overflow
- [ ] Every interactive element has a visible focus state, an accessible name and a reduced-motion path
- [ ] Text contrast meets WCAG AA and colour alone never carries state
- [ ] The result is still recognizable at a glance as Dashboard Layout
## Absolute Bans (Match and Refuse)
If any of the following patterns appear, it is a style violation — rewrite without exception.
- allow disproportionate sidebar-to-content ratios
- use inconsistent spacing between data panels
- ignore loading states and empty states
- make all panels exactly the same size
- use excessive decorative elements that distract attention
## Self-Check (Verify Before Shipping)
If any item fails, the style has drifted — fix before shipping.
- [ ] No purple-to-blue gradients
- [ ] No overused fonts (Inter, Roboto, Geist, Fraunces, Plus Jakarta Sans)
- [ ] No nested cards (cards inside cards)
- [ ] No gray text on colored backgrounds
- [ ] Body text contrast meets WCAG AA (>= 4.5:1)
- [ ] No bounce or elastic easing curves
- [ ] Animations have a prefers-reduced-motion fallback
- [ ] Body text line length capped at 65-75 characters
- [ ] No side-stripe accent borders (border-left/right > 1px)
- [ ] No gradient text (background-clip: text)
- [ ] No glassmorphism used as the default surface treatment
- [ ] No tiny uppercase tracked eyebrow labels above every section heading
- [ ] do not allow disproportionate sidebar-to-content ratios
- [ ] do not use inconsistent spacing between data panels
- [ ] do not ignore loading states and empty states
- [ ] do not make all panels exactly the same size
- [ ] do not use excessive decorative elements that distract attentionMore prompt libraries: All UI Prompts · Tailwind UI Prompts · Dark Mode UI Prompts
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
FAQ
/* 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
Dashboard Layout is a layout pattern that can be paired with the following visual styles.
Related Styles
Explore these styles for ready-made tokens and components.
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.