Best For
Material Design / Material UI / Google design system
Google's design system based on the metaphor of paper and ink, emphasizing hierarchy, motion, bold colors, and responsive interactions -- the standard for modern mobile design.
Best For
Material Design / Material UI / Google design system
Primary Move
Use elevation shadow system to express hierarchy
Watch Out
Do NOT use inconsistent shadow depths
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: Material Design
style_slug: material-design
style_source: /styles/material-design
# 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 Material Design frontend development expert. All generated code must strictly follow these constraints:
## Absolute Prohibitions
- Using inconsistent shadow depths
- Using overly soft muted color schemes
- Omitting interaction feedback effects
- Breaking the 8dp grid system
## Must Follow
- Elevation shadows shadow-[0_1px_3px_rgba(0,0,0,0.12),0_1px_2px_rgba(0,0,0,0.24)]
- Primary color bg-[#6200ee] text-white
- Accent color bg-[#03dac6]
- Rounded cards rounded-xl
- Uppercase button text uppercase tracking-wider
## Color Palette
- Primary: #6200ee (purple)
- Primary variant: #3700b3
- Secondary: #03dac6 (cyan)
- Background: #fafafa
- Surface: #ffffff
- Error: #b00020
## Spacing
- Based on 8dp grid
- p-2 (8px), p-4 (16px), p-6 (24px), p-8 (32px)
## Animation & Interaction Rules
- Elevation Physics: Hover lifts from low to high elevation shadow, optionally paired with slight -translate-y-1 to enhance Z-axis feel.
- Pseudo-Ripple: Active state must include at least active:scale-[0.98] or brightness press feedback, simulating touch ripple prelude.
- Deceleration Curve: Interaction transitions prefer ease-[cubic-bezier(0.4,0,0.2,1)], duration 200-300ms.
- Input Float: On input focus, label must smoothly float up and shrink, with border highlight transitioning in sync.
---
# Material Design Design System
> Google's design system based on the metaphor of paper and ink, emphasizing hierarchy, motion, bold colors, and responsive interactions -- the standard for modern mobile design.
## Design Philosophy
Material Design is Google's cross-platform design language, introduced in 2014 and still evolving. Its founding insight was deceptively simple: treat the interface as a physical material -- paper with real thickness, resting on a stage with real light.
That metaphor drives every rule in the system. Surfaces have elevation, elevation casts shadows, and shadows communicate hierarchy. A dialog floats above a card; a card floats above the page. Users never need to learn a legend to know what sits on top of what.
Core principles:
- Material metaphor: Surfaces are sheets of paper. They have edges, they can be stacked, folded and moved, but they never pass through one another
- Elevation and light: A single light source from above casts shadows whose size encodes height -- a resting card sits at elevation 1, a floating action button at elevation 6
- Bold color: A primary and a secondary color carry the entire identity, applied flat and full-bleed rather than as outlines or effects
- Meaningful motion: Animation exists to explain spatial relationships -- where a surface came from, where it went -- never as decoration
- Responsive grid: An 8dp baseline grid and a 12/8/4-column responsive layout keep rhythm consistent from watch to desktop
In practice the language shows up as rectangular surfaces with subtle rounded corners (4dp in the classic spec, 16-28dp in Material 3), filled buttons that use color rather than borders, and a type scale built on Roboto -- or the platform's own face under Material You. The signature move is restraint: one accent, one elevation language, and no shadow that does not correspond to a real stack.
Suitable for: Android and cross-platform products, admin dashboards and settings screens, design systems that must scale to hundreds of contributors, and any interface where clarity of hierarchy matters more than novelty.
---
## Token Dictionary (exact class mapping)
### Border
```
Width: border
Color: border-[#e0e0e0]
Radius: rounded-md
```
### Shadow
```
sm: shadow-[0_1px_3px_rgba(0,0,0,0.12),0_1px_2px_rgba(0,0,0,0.14)]
md: shadow-[0_3px_6px_rgba(0,0,0,0.15),0_2px_4px_rgba(0,0,0,0.12)]
lg: shadow-[0_10px_20px_rgba(0,0,0,0.15),0_3px_6px_rgba(0,0,0,0.1)]
hover: hover:shadow-[0_14px_28px_rgba(0,0,0,0.18),0_5px_10px_rgba(0,0,0,0.12)]
focus: focus:shadow-[0_3px_6px_rgba(0,0,0,0.15),0_2px_4px_rgba(0,0,0,0.12)]
```
### Interaction
```
Hover translate: (none)
Hover scale: hover:scale-[1.01]
Hover opacity: (none)
Transition: transition-all duration-200 ease-in-out
Active: active:scale-[0.99]
```
### Typefaces
```
Heading: font-sans font-medium tracking-tight
Body: font-sans
Mono: font-mono
```
### Type scale
```
Hero: text-4xl md:text-6xl lg:text-7xl
H1: text-3xl md:text-5xl
H2: text-2xl md:text-3xl
H3: text-xl md:text-2xl
Body: text-sm md:text-base
Small: text-xs md:text-sm
```
### Spacing
```
Section: py-10 md:py-16 lg:py-24
Container: px-4 md:px-6 lg:px-8
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-white
Background secondary: bg-[#f5f5f5]
Background accent: bg-[#6200ee], bg-[#03dac6], bg-[#018786], bg-[#bb86fc]
Text primary: text-[#212121]
Text secondary: text-[#757575]
Text muted: text-[#9e9e9e]
Button primary: bg-[#6200ee] text-white
Button secondary: bg-transparent text-[#6200ee] border border-[#6200ee]
```
---
## [FORBIDDEN]
These classes are banned in this style. Check for them before returning code:
### Banned classes
- `rounded-none`
- `border-black`
- `border-4`
- `shadow-[2px_2px_0px`
- `shadow-[4px_4px_0px`
- `shadow-[8px_8px_0px`
- `font-black`
- `font-serif`
- `bg-gradient-to-r`
- `bg-gradient-to-l`
### Banned patterns
- matches `^rounded-none$`
- matches `^shadow-\[\d+px_\d+px_0px`
- matches `^font-(?:black|serif)$`
- matches `^border-(?:black|4)$`
### Why they are banned
- `rounded-none`: Material Design uses subtle rounding (rounded-md) for card elevation
- `shadow-[4px_4px_0px`: Material Design uses elevation-based blur shadows, not hard-edge
- `border-black`: Material Design uses subtle gray borders or relies on elevation shadows
- `font-serif`: Material Design uses clean sans-serif typography (Roboto-style)
> WARNING: if your code contains any of the above, replace it before shipping.
---
## [REQUIRED]
### Every button must include
```
rounded-md
shadow-[0_1px_3px_rgba(0,0,0,0.12),0_1px_2px_rgba(0,0,0,0.14)]
hover:shadow-[0_14px_28px_rgba(0,0,0,0.18),0_5px_10px_rgba(0,0,0,0.12)]
transition-all duration-200 ease-in-out
font-medium
```
### Every card must include
```
rounded-md
shadow-[0_1px_3px_rgba(0,0,0,0.12),0_1px_2px_rgba(0,0,0,0.14)]
bg-white
```
### Every input must include
```
rounded-md
border border-[#e0e0e0]
bg-white
font-sans
focus:border-[#6200ee]
focus:outline-none
```
---
## [COMPARE] Material Design 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-md shadow-[0_1px_3px_rgba(0,0,0,0.12),0_1px_2px_rgba(0,0,0,0.14)] hover:shadow-[0_14px_28px_rgba(0,0,0,0.18),0_5px_10px_rgba(0,0,0,0.12)] transition-all duration-200 ease-in-out font-medium bg-[#6200ee] 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="rounded-md shadow-[0_1px_3px_rgba(0,0,0,0.12),0_1px_2px_rgba(0,0,0,0.14)] bg-white p-4 md:p-6">
<h3 class="font-sans font-medium tracking-tight text-xl md:text-2xl">{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="rounded-md border border-[#e0e0e0] bg-white font-sans focus:border-[#6200ee] focus:outline-none" placeholder="{PLACEHOLDER}" />
```
---
## [TEMPLATES] Material Design page skeletons
These skeletons use this style's tokens only. Replace `{PLACEHOLDER}` values, but keep every token in place:
### Navigation
```html
<nav class="bg-white text-[#212121] border border-[#e0e0e0] px-4 md:px-6 lg:px-8">
<div class="flex items-center justify-between max-w-6xl mx-auto gap-3 md:gap-4">
<a href="/" class="font-sans font-medium tracking-tight text-xl md:text-2xl">
{LOGO_TEXT}
</a>
<div class="flex gap-3 md:gap-4 font-sans text-xs md:text-sm">
{NAV_LINKS}
</div>
</div>
</nav>
```
### Hero section
```html
<section class="bg-[#6200ee] text-[#212121] py-10 md:py-16 lg:py-24 px-4 md:px-6 lg:px-8">
<div class="max-w-4xl mx-auto">
<h1 class="font-sans font-medium tracking-tight text-4xl md:text-6xl lg:text-7xl">
{HEADLINE}
</h1>
<p class="font-sans text-sm md:text-base max-w-xl">
{SUBHEADLINE}
</p>
<button class="rounded-md shadow-[0_1px_3px_rgba(0,0,0,0.12),0_1px_2px_rgba(0,0,0,0.14)] hover:shadow-[0_14px_28px_rgba(0,0,0,0.18),0_5px_10px_rgba(0,0,0,0.12)] transition-all duration-200 ease-in-out font-medium bg-[#6200ee] text-white">
{CTA_TEXT}
</button>
</div>
</section>
```
### Card grid
```html
<section class="bg-white text-[#212121] py-10 md:py-16 lg:py-24 px-4 md:px-6 lg:px-8">
<div class="max-w-6xl mx-auto">
<h2 class="font-sans font-medium tracking-tight text-2xl md:text-3xl">{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="rounded-md shadow-[0_1px_3px_rgba(0,0,0,0.12),0_1px_2px_rgba(0,0,0,0.14)] bg-white p-4 md:p-6">
<h3 class="font-sans font-medium tracking-tight text-xl md:text-2xl">{CARD_TITLE}</h3>
<p class="font-sans text-sm md:text-base text-[#9e9e9e]">{CARD_DESCRIPTION}</p>
</div>
</div>
</div>
</section>
```
### Form input
```html
<input class="rounded-md border border-[#e0e0e0] bg-white font-sans focus:border-[#6200ee] focus:outline-none" placeholder="{PLACEHOLDER}" />
```
### Footer
```html
<footer class="bg-[#f5f5f5] text-[#757575] py-10 md:py-16 lg:py-24 px-4 md:px-6 lg:px-8">
<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-sans font-medium tracking-tight text-xl md:text-2xl">{LOGO_TEXT}</span>
<p class="font-sans text-xs md:text-sm">{TAGLINE}</p>
</div>
<div>
<h4 class="font-sans font-medium tracking-tight text-xl md:text-2xl">{COLUMN_TITLE}</h4>
<ul class="font-sans text-xs md:text-sm">
{FOOTER_LINKS}
</ul>
</div>
</div>
</div>
</footer>
```
---
## [CHECKLIST] Material Design post-generation self check
**Before returning code, verify every token and rule below. Fix any violation before delivering:**
### Token check
- [ ] Button includes: `rounded-md shadow-[0_1px_3px_rgba(0,0,0,0.12),0_1px_2px_rgba(0,0,0,0.14)] hover:shadow-[0_14px_28px_rgba(0,0,0,0.18),0_5px_10px_rgba(0,0,0,0.12)] transition-all duration-200 ease-in-out font-medium`
- [ ] Card includes: `rounded-md shadow-[0_1px_3px_rgba(0,0,0,0.12),0_1px_2px_rgba(0,0,0,0.14)] bg-white`
- [ ] Input includes: `rounded-md border border-[#e0e0e0] bg-white font-sans focus:border-[#6200ee] focus:outline-none`
### Forbidden check
- [ ] Not using `rounded-none`
- [ ] Not using `border-black`
- [ ] Not using `border-4`
- [ ] Not using `shadow-[2px_2px_0px`
- [ ] Not using `shadow-[4px_4px_0px`
- [ ] Not using `shadow-[8px_8px_0px`
- [ ] Not using `font-black`
- [ ] Not using `font-serif`
### Style rule check
- [ ] Use elevation shadow system to express hierarchy
- [ ] Apply ripple effects as click feedback
- [ ] Use bold vivid colors
- [ ] Maintain 8dp spacing grid
- [ ] Use Roboto font
### Style drift check
- [ ] Does not violate: Do NOT use inconsistent shadow depths
- [ ] Does not violate: Do NOT use overly soft color schemes
- [ ] Does not violate: Do NOT omit interaction feedback
- [ ] Does not violate: Do NOT break the 8dp grid system
- [ ] Does not violate: Do NOT omit active:scale-[0.98] on buttons (Material Pseudo-Ripple is core to tactile authenticity)
### 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 Material Design
## Absolute Bans (Match and Refuse)
If any of the following patterns appear, it is a style violation — rewrite without exception.
- use inconsistent shadow depths
- use overly soft color schemes
- omit interaction feedback
- break the 8dp grid system
- omit active:scale-[0.98] on buttons (Material Pseudo-Ripple is core to tactile authenticity)
- use non-Material standard easing curves (must use cubic-bezier(0.4,0,0.2,1))
- keep card shadows unchanged on hover (elevation change is a Material physics rule, cannot be omitted)
## 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 use inconsistent shadow depths
- [ ] do NOT use overly soft color schemes
- [ ] do NOT omit interaction feedback
- [ ] do NOT break the 8dp grid system
- [ ] do NOT omit active:scale-[0.98] on buttons (Material Pseudo-Ripple is core to tactile authenticity)More prompt libraries: All UI Prompts · Tailwind UI Prompts · Dark Mode UI Prompts
Component Templates
Material 风格按钮,强调海拔反馈与下压触感
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
/* Material Design 全局样式 */
:root {
--md-primary: #6200ee;
--md-primary-variant: #3700b3;
--md-secondary: #03dac6;
--md-secondary-variant: #018786;
--md-background: #fafafa;
--md-surface: #ffffff;
--md-error: #b00020;
}
/* 海拔阴影系统 */
.md-elevation-1 {
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}
.md-elevation-2 {
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}
.md-elevation-3 {
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
.md-elevation-4 {
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}
/* 涟漪效果基础 */
.md-ripple {
position: relative;
overflow: hidden;
}
/* 浮动标签输入框 */
.md-text-field {
background: #f5f5f5;
border-radius: 4px 4px 0 0;
border-bottom: 2px solid #9e9e9e;
}
.md-text-field:focus {
border-bottom-color: var(--md-primary);
}
@keyframes material-design-fade-in {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes material-design-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.7; }
}
.material-design-card {
position: relative;
overflow: hidden;
}
.material-design-card::before {
content: "";
position: absolute;
inset: 0;
opacity: 0;
transition: opacity 0.3s ease;
background: linear-gradient(135deg, rgba(98, 0, 238, 0.05), transparent);
pointer-events: none;
}
.material-design-card:hover::before {
opacity: 1;
}
.material-design-gradient {
background: linear-gradient(135deg, #6200ee, #ff0266);
}
.material-design-gradient-text {
background: linear-gradient(135deg, #6200ee, #ff0266);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.material-design-frosted {
backdrop-filter: blur(12px) saturate(180%);
-webkit-backdrop-filter: blur(12px) saturate(180%);
background: rgba(98, 0, 238, 0.08);
}
.material-design-accent-corner {
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2rem), calc(100% - 2rem) 100%, 0 100%);
}
.material-design-animate-in {
animation: material-design-fade-in 0.5s ease-out both;
}Compatible Layout Patterns
The following layout patterns pair well with the Material Design style.
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
Material Design is Google's cross-platform design language, introduced in 2014 and still evolving. Its founding insight was deceptively simple: treat the interface as a physical material -- paper with real thickness, resting on a stage with real light.
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 | /#212121 / #ffffff | 16.1:1 | ||
| Secondary text on background | /#757575 / #ffffff | 4.61:1 | ||
| Muted text on background | /#9e9e9e / #ffffff | 2.68:1 | ||
| Text on secondary background | /#212121 / #f5f5f5 | 14.77:1 | ||
| Secondary text on secondary | /#757575 / #f5f5f5 | 4.23:1 | ||
| Button primary | /#ffffff / #6200ee | 7.63:1 | ||
| Text on accent 1 | /#212121 / #6200ee | 2.11:1 | ||
| Alt text on accent 1 | /#757575 / #6200ee | 1.65:1 | ||
| Text on accent 2 | /#212121 / #03dac6 | 9.08:1 | ||
| Alt text on accent 2 | /#757575 / #03dac6 | 2.6:1 | ||
| Text on accent 3 | /#212121 / #018786 | 3.69:1 | ||
| Alt text on accent 3 | /#757575 / #018786 | 1.06:1 | ||
| Text on accent 4 | /#212121 / #bb86fc | 6.08:1 | ||
| Alt text on accent 4 | /#757575 / #bb86fc | 1.74:1 |
Readability
Score
85/100
Font Size
text-sm md:text-base
Font Weight
font-sans font-medium 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.