Best For
cel shading / toon shading / cartoon ui
赛璐璐动画风
A rendering style inspired by traditional cel animation, featuring bold black outlines, flat color fills, hard shadows without gradients, and vivid saturated colors full of cartoon and game energy.
Best For
cel shading / toon shading / cartoon ui
Primary Move
Use 3px bold black borders on all elements border-[3px] border-[#1a1a2e]
Watch Out
Do not use gradient colors (maintain flat color fills)
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: Cel Shading
style_slug: cel-shading
style_source: /styles/cel-shading
# 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 designing in Cel Shading (Toon Shading) style.
- All elements MUST have 3px solid black borders: border-[3px] border-[#1a1a2e]
- Use hard offset shadows ONLY: shadow-[3px_3px_0_#1a1a2e] or shadow-[4px_4px_0_#1a1a2e]
- NO gradients, NO blur shadows, NO soft edges
- Flat saturated colors: #e63946, #4ea8de, #2ecc71, #f1c40f
- Text is always bold/black weight and uppercase
- Light background #fafaf5 with dark ink outlines
- Think "video game menu" or "cartoon UI"
Animation & Interaction Rules:
- Anime Physics: Use extremely short transitions (duration-75) to simulate 2D animation keyframes. Avoid silky smooth easing.
- Squash & Stretch: On :active, use cartoon physics -- active:scale-x-110 active:scale-y-90 -- combined with translate toward click direction.
- Zero-Blur Impact: On :active, hard shadow must instantly snap to zero (active:shadow-none), creating a strong physical "hit" sensation.
- Toon Highlight: On hover, a white diagonal stripe (bg-white/30 -skew-x-12) sweeps across the button via translate-x from off-screen to [200%], simulating cel shading's hard specular highlight.
- Hover Lift: Elements can hover:-translate-y-1 with expanded shadow to "charge up" before clicking.
## Absolute Bans (Match and Refuse)
If any of the following patterns appear, it is a style violation — rewrite without exception.
- use gradient colors (maintain flat color fills)
- use blurred shadows shadow-lg
- use thin borders border
- use low-saturation or grayish tones
- use smooth transitions above duration-300 (too soft)
- use ease-in-out (cartoon physics uses linear or ease-in)
## 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 gradient colors (maintain flat color fills)
- [ ] do not use blurred shadows shadow-lg
- [ ] do not use thin borders border
- [ ] do not use low-saturation or grayish tones
- [ ] do not use smooth transitions above duration-300 (too soft)Component Templates
赛璐璐按钮,抽帧感 + Squash & Stretch + 高光扫过
Frontend Readiness
This layer tracks whether the style is ready for real websites: theme modes, state feedback, keyboard access, and performance constraints.
Overall
51%
Fallback
Dark Mode
0%
MissingUI States
79%
PartialMotion
70%
PartialA11y
70%
PartialPerformance
35%
FallbackButton
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
/* Cel Shading */
:root {
--cel-bg: #fafaf5;
--cel-ink: #1a1a2e;
--cel-red: #e63946;
--cel-blue: #4ea8de;
--cel-green: #2ecc71;
--cel-yellow: #f1c40f;
--cel-purple: #9b59b6;
}
/* 高光扫过动画 */
.cel-shine {
position: relative;
overflow: hidden;
}
.cel-shine::after {
content: '';
position: absolute;
top: 0;
left: -2rem;
width: 2rem;
height: 100%;
background: rgba(255, 255, 255, 0.3);
transform: skewX(-12deg);
transition: transform 0.3s linear;
}
.cel-shine:hover::after {
transform: skewX(-12deg) translateX(400%);
}
/* 硬击动画 */
.cel-impact:active {
transform: scaleX(1.1) scaleY(0.9) translate(2px, 4px);
box-shadow: none !important;
transition-duration: 75ms;
}
@keyframes cel-shading-fade-in {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes cel-shading-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.7; }
}
.cel-shading-gradient {
background: linear-gradient(135deg, #1a1a2e, #e63946);
}
.cel-shading-gradient-text {
background: linear-gradient(135deg, #1a1a2e, #e63946);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.cel-shading-frosted {
backdrop-filter: blur(12px) saturate(180%);
-webkit-backdrop-filter: blur(12px) saturate(180%);
background: rgba(26, 26, 46, 0.08);
}
.cel-shading-accent-corner {
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2rem), calc(100% - 2rem) 100%, 0 100%);
}
.cel-shading-animate-in {
animation: cel-shading-fade-in 0.5s ease-out both;
}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
Cel Shading (Toon Shading) simulates the visual effect of traditional hand-drawn animation.
WCAG 2.1 compliance analysis based on color contrast and typography readability.
Overall Score
Grade: B - Good
Contrast Ratios
| Context | Colors | Ratio | AA | AAA |
|---|---|---|---|---|
| Text on background | /#1a1a2e / #fafaf5 | 16.29:1 | ||
| Secondary text on background | /#1a1a2e / #fafaf5 | 16.29:1 | ||
| Muted text on background | /#1a1a2e / #fafaf5 | 16.29:1 | ||
| Text on secondary background | /#1a1a2e / #ffffff | 17.06:1 | ||
| Secondary text on secondary | /#1a1a2e / #ffffff | 17.06:1 | ||
| Button primary | /#ffffff / #e63946 | 4.17:1 | ||
| Text on accent 1 | /#1a1a2e / #e63946 | 4.09:1 | ||
| Alt text on accent 1 | /#1a1a2e / #e63946 | 4.09:1 | ||
| Text on accent 2 | /#1a1a2e / #4ea8de | 6.48:1 | ||
| Alt text on accent 2 | /#1a1a2e / #4ea8de | 6.48:1 | ||
| Text on accent 3 | /#1a1a2e / #2ecc71 | 8.12:1 | ||
| Alt text on accent 3 | /#1a1a2e / #2ecc71 | 8.12:1 | ||
| Text on accent 4 | /#1a1a2e / #f1c40f | 10.27:1 | ||
| Alt text on accent 4 | /#1a1a2e / #f1c40f | 10.27:1 |
Readability
Score
87/100
Font Size
text-sm md:text-base
Font Weight
font-black uppercase 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.