Style Catalog/Cel Shading

Cel Shading

赛璐璐动画风

B
81/100Good
Rate this style

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.

cel shadingtoon shadingcartoon uibold outlinesflat shadinghard shadowsanime stylecomic outlinegame uisaturated colors
View Full Showcase →
Templates

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

Copy the Hard Prompt first, then use the spec when needed

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.

Hard Prompt

Use this by default: copy it, append the concrete requirement, and let AI generate consistent production UI.

When to use

  • When AI should generate UI directly
  • When repeated outputs must stay consistent
  • When style drift is the main risk

How to use

  • Copy the full prompt
  • Append the concrete requirement
  • Review against forbidden rules and UI states
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.

---

# Cel Shading Design System

> 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.

## Design Philosophy

Cel Shading (Toon Shading) simulates the visual effect of traditional hand-drawn animation.

Core principles:
- Bold black outlines: all elements have distinct 3px black borders
- Flat color fills: using solid colors with no gradients
- Hard shadows: shadows are solid offsets, not blurred
- High saturation: vivid colors with strong contrast
- Game-like UI: buttons and cards feel lively like game menus
- Frame-skipping feel: interactions are extremely brief, simulating keyframes rather than smooth transitions

---

## Token Dictionary (exact class mapping)

### Border
```
Width: border-[3px]
Color: border-[#1a1a2e]
Radius: rounded-none
```

### Shadow
```
sm: shadow-[2px_2px_0_#1a1a2e]
md: shadow-[3px_3px_0_#1a1a2e]
lg: shadow-[4px_4px_0_#1a1a2e]
hover: hover:shadow-[1px_1px_0_#1a1a2e]
focus: focus:shadow-[3px_3px_0_#1a1a2e]
```

### Interaction
```
Hover translate: hover:translate-x-0.5 hover:translate-y-0.5
Hover scale: (none)
Hover opacity: (none)
Transition: transition-all duration-150
Active: active:translate-x-1 active:translate-y-1 active:shadow-none
```

### Typefaces
```
Heading: font-black uppercase tracking-tight
Body: font-bold
Mono: font-mono font-bold
```

### Type scale
```
Hero: text-4xl md:text-6xl lg:text-8xl
H1: text-3xl md:text-5xl
H2: text-2xl md:text-4xl
H3: text-xl md:text-2xl
Body: text-sm md:text-base
Small: text-xs
```

### Spacing
```
Section: py-12 md:py-20
Container: px-4 md:px-8
Card: p-6
Gap sm: gap-3
Gap md: gap-6
Gap lg: gap-8
```

### Color roles
```
Background primary: bg-[#fafaf5]
Background secondary: bg-white
Background accent: bg-[#e63946], bg-[#4ea8de], bg-[#2ecc71], bg-[#f1c40f]
Text primary: text-[#1a1a2e]
Text secondary: text-[#1a1a2e]/60
Text muted: text-[#1a1a2e]/40
Button primary: bg-[#e63946] text-white
Button secondary: bg-[#4ea8de] text-white
```

---

## [FORBIDDEN]

These classes are banned in this style. Check for them before returning code:

### Banned classes
- `shadow-sm`
- `shadow-md`
- `shadow-lg`
- `shadow-xl`
- `bg-gradient-to-r`
- `bg-gradient-to-b`
- `bg-gradient-to-br`
- `rounded-lg`
- `rounded-xl`
- `rounded-2xl`
- `rounded-3xl`
- `rounded-full`
- `border`
- `border-[1px]`
- `font-light`
- `font-extralight`
- `font-thin`
- `opacity-50`
- `opacity-30`

### Banned patterns
- matches `^shadow-(?:sm|md|lg|xl|2xl)$`
- matches `^bg-gradient`
- matches `^rounded-(?:lg|xl|2xl|3xl|full)$`
- matches `^font-(?:light|extralight|thin)$`

### Why they are banned
- `shadow-md`: Only hard offset shadows allowed, no blur shadows
- `bg-gradient-to-r`: Flat solid colors only, no gradients
- `rounded-lg`: Sharp corners (rounded-none) for cartoon panel aesthetic
- `font-light`: Bold and black weights only for impactful text

> WARNING: if your code contains any of the above, replace it before shipping.

---

## [REQUIRED]

### Every button must include
```
border-[3px]
border-[#1a1a2e]
font-black
uppercase
```

### Every card must include
```
border-[3px]
border-[#1a1a2e]
shadow-[3px_3px_0_#1a1a2e]
```

### Every input must include
```
border-[3px]
border-[#1a1a2e]
focus:outline-none
```

---

## [COMPARE] Cel Shading 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="border-[3px] border-[#1a1a2e] font-black uppercase bg-[#e63946] 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="border-[3px] border-[#1a1a2e] shadow-[3px_3px_0_#1a1a2e] p-6">
  <h3 class="font-black uppercase 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="border-[3px] border-[#1a1a2e] focus:outline-none" placeholder="{PLACEHOLDER}" />
```

---

## [TEMPLATES] Cel Shading page skeletons

These skeletons use this style's tokens only. Replace `{PLACEHOLDER}` values, but keep every token in place:

### Navigation
```html
<nav class="bg-[#fafaf5] text-[#1a1a2e] border-[3px] border-[#1a1a2e] px-4 md:px-8">
  <div class="flex items-center justify-between max-w-6xl mx-auto gap-6">
    <a href="/" class="font-black uppercase tracking-tight text-xl md:text-2xl">
      {LOGO_TEXT}
    </a>
    <div class="flex gap-6 font-bold text-xs">
      {NAV_LINKS}
    </div>
  </div>
</nav>
```

### Hero section
```html
<section class="bg-[#e63946] text-[#1a1a2e] py-12 md:py-20 px-4 md:px-8">
  <div class="max-w-4xl mx-auto">
    <h1 class="font-black uppercase tracking-tight text-4xl md:text-6xl lg:text-8xl">
      {HEADLINE}
    </h1>
    <p class="font-bold text-sm md:text-base max-w-xl">
      {SUBHEADLINE}
    </p>
    <button class="border-[3px] border-[#1a1a2e] font-black uppercase bg-[#e63946] text-white">
      {CTA_TEXT}
    </button>
  </div>
</section>
```

### Card grid
```html
<section class="bg-[#fafaf5] text-[#1a1a2e] py-12 md:py-20 px-4 md:px-8">
  <div class="max-w-6xl mx-auto">
    <h2 class="font-black uppercase tracking-tight text-2xl md:text-4xl">{SECTION_TITLE}</h2>
    <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
      <!-- Card template - repeat for each card -->
      <div class="border-[3px] border-[#1a1a2e] shadow-[3px_3px_0_#1a1a2e] p-6">
        <h3 class="font-black uppercase tracking-tight text-xl md:text-2xl">{CARD_TITLE}</h3>
        <p class="font-bold text-sm md:text-base text-[#1a1a2e]/40">{CARD_DESCRIPTION}</p>
      </div>
    </div>
  </div>
</section>
```

### Form input
```html
<input class="border-[3px] border-[#1a1a2e] focus:outline-none" placeholder="{PLACEHOLDER}" />
```

### Footer
```html
<footer class="bg-white text-[#1a1a2e]/60 py-12 md:py-20 px-4 md:px-8">
  <div class="max-w-6xl mx-auto">
    <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
      <div>
        <span class="font-black uppercase tracking-tight text-xl md:text-2xl">{LOGO_TEXT}</span>
        <p class="font-bold text-xs">{TAGLINE}</p>
      </div>
      <div>
        <h4 class="font-black uppercase tracking-tight text-xl md:text-2xl">{COLUMN_TITLE}</h4>
        <ul class="font-bold text-xs">
          {FOOTER_LINKS}
        </ul>
      </div>
    </div>
  </div>
</footer>
```

---

## [CHECKLIST] Cel Shading post-generation self check

**Before returning code, verify every token and rule below. Fix any violation before delivering:**

### Token check
- [ ] Button includes: `border-[3px] border-[#1a1a2e] font-black uppercase`
- [ ] Card includes: `border-[3px] border-[#1a1a2e] shadow-[3px_3px_0_#1a1a2e]`
- [ ] Input includes: `border-[3px] border-[#1a1a2e] focus:outline-none`

### Forbidden check
- [ ] Not using `shadow-sm`
- [ ] Not using `shadow-md`
- [ ] Not using `shadow-lg`
- [ ] Not using `shadow-xl`
- [ ] Not using `bg-gradient-to-r`
- [ ] Not using `bg-gradient-to-b`
- [ ] Not using `bg-gradient-to-br`
- [ ] Not using `rounded-lg`

### Style rule check
- [ ] Use 3px bold black borders on all elements border-[3px] border-[#1a1a2e]
- [ ] Hard shadow effect shadow-[3px_3px_0_#1a1a2e]
- [ ] Use solid color fills, no gradients bg-[#e63946]
- [ ] Bold fonts font-black uppercase
- [ ] Click interaction: shadow shrinks + offset hover:translate-x-0.5

### Style drift check
- [ ] Does not violate: Do not use gradient colors (maintain flat color fills)
- [ ] Does not violate: Do not use blurred shadows shadow-lg
- [ ] Does not violate: Do not use thin borders border
- [ ] Does not violate: Do not use low-saturation or grayish tones
- [ ] Does not violate: Do not use smooth transitions above duration-300 (too soft)

### 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 Cel Shading

## 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)

More prompt libraries: All UI Prompts · Tailwind UI Prompts · Dark Mode UI Prompts

Community

Ratings & Feedback

No ratings yet - be the firstSign in to rate

Loading comments…

Component Templates

Component Preview

按钮

赛璐璐按钮,抽帧感 + Squash & Stretch + 高光扫过

Frontend Readiness

Dark Mode, States, Motion, and Accessibility

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%

Missing

UI States

79%

Partial

Motion

70%

Partial

A11y

70%

Partial

Performance

35%

Fallback

Key State Coverage

light
HoverFocus VisibleDisabledLoadingEmptyErrorSuccess

Button

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

Implementation Notes

  • No curated dark-mode contract exists yet.
  • Check contrast in both light and dark modes.
  • Check heavy shadows, blur, large media, and scroll-linked effects manually.
  • No style-specific performance cost profile has been curated yet.

FAQ

Cel Shading — Frequently Asked Questions

What is the Cel Shading design style?
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. Its core principle: Cel Shading (Toon Shading) simulates the visual effect of traditional hand-drawn animation.
What colors does Cel Shading use?
Cel Shading uses #1a1a2e as its primary color and #fafaf5 as its secondary color, with accent colors #e63946, #4ea8de, #2ecc71, #f1c40f. Every hex value can be copied from the palette on this page.
How do I apply Cel Shading correctly?
Key practices: Use 3px bold black borders on all elements border-[3px] border-[#1a1a2e]. Hard shadow effect shadow-[3px_3px_0_#1a1a2e]. Use solid color fills, no gradients bg-[#e63946].
What are common mistakes with Cel Shading?
Avoid: Do not use gradient colors (maintain flat color fills). Do not use blurred shadows shadow-lg. Do not use thin borders border.
How do I prompt AI to generate Cel Shading UI?
Copy the ready-made AI prompt on this page — it bundles the design tokens and component rules — and paste it into ChatGPT, Claude, Claude Code, or Codex. Effective prompts include the keywords: cel shading, toon shading, cartoon ui, bold outlines.
Global Styles

Global CSS

css
/* 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

IDE Configuration Export

Download configuration files for AI coding assistants to generate code in this style.

Style Pack

Export 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

Design Philosophy

Cel Shading (Toon Shading) simulates the visual effect of traditional hand-drawn animation.

Accessibility

Accessibility Score

WCAG 2.1 compliance analysis based on color contrast and typography readability.

81

Overall Score

Grade: B - Good

Contrast Ratios

Score: 78/100Average Ratio: 10.36:1
AA FailAAA Fail
ContextColorsRatioAAAAA
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.