Style Catalog/Modern Gradient

Modern Gradient

现代渐变风

A
97/100Excellent
Rate this style

Vibrant modern gradient style with colorful gradient backgrounds, glass-textured cards, and dynamic lighting effects. Ideal for startups, digital products, and event pages.

modern gradientgradient designgradient backgroundmesh gradientvibrant colorsglass cardsdynamic lightingcolorful uistartup landing pageSaaS websitehero section
View Full Showcase →
Templates

Best For

modern gradient / gradient design / gradient background

Primary Move

Use bg-gradient-to-r from-violet-500 via-purple-500 to-fuchsia-500 and similar gradients

Watch Out

Do not use solid color backgrounds (main areas)

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: Modern Gradient
style_slug: modern-gradient
style_source: /styles/modern-gradient

# 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

STYLE: Modern Gradient
TYPE: Vibrant, energetic gradient design

MUST USE:
- Gradient backgrounds: bg-gradient-to-r from-violet-500 to-fuchsia-500
- Glass morphism cards: backdrop-blur-xl bg-white/10 border-white/20
- Dark base background: bg-slate-950 or bg-[#1e1b4b]
- Gradient text: bg-gradient-to-r bg-clip-text text-transparent
- Colored shadows: shadow-violet-500/25
- Large rounded corners: rounded-2xl, rounded-3xl
- Glow orbs for decoration: blur-3xl opacity-30

MUST AVOID:
- Solid color backgrounds (main areas)
- Monotone gray schemes
- Sharp corners (rounded-none)
- Old-style gradients (vertical button gradients)
- Visual clutter from too many gradients
- Dark text on dark gradients

COLOR COMBOS:
- Violet to Fuchsia: from-violet-500 to-fuchsia-500
- Cyan to Blue: from-cyan-500 to-blue-500
- Pink to Orange: from-pink-500 to-orange-500
- Multi-color: from-violet-500 via-fuchsia-500 to-cyan-500

TYPOGRAPHY:
- Headings: White or gradient text
- Body: text-white/70 or text-white/80
- Font weight: font-medium to font-semibold

## Animation & Interaction Rules

- Gradient Flow: Gradient interactions should include color band shifting (e.g. bg-[length:200%_auto] + hover:bg-right), avoid static brightening/darkening.
- Neon Dispersion: On hover, colored shadow spread radius increases significantly, reinforcing futuristic glow halo.
- Zero-Gravity Float: Cards and buttons can slightly lift and micro-scale, recommend duration-500 + ease-out.
- Luminous Borders: Semi-transparent borders brighten to brand color opacity on hover, creating edges lit by internal light.

---

# Modern Gradient Design System

> Vibrant modern gradient style with colorful gradient backgrounds, glass-textured cards, and dynamic lighting effects. Ideal for startups, digital products, and event pages.

## Design Philosophy

Modern Gradient style creates visual impact and vitality through rich gradient colors and lighting effects.

Core principles:
- Visual vitality: Gradient colors bring dynamism and energy
- Depth and layers: Create depth through gradients and transparency
- Modern tech: Convey an innovative and cutting-edge brand image
- Emotional resonance: Colors evoke positive emotional responses

---

## Token Dictionary (exact class mapping)

### Border
```
Width: border
Color: border-white/20
Radius: rounded-2xl
```

### Shadow
```
sm: shadow-lg shadow-violet-500/20
md: shadow-xl shadow-violet-500/25
lg: shadow-2xl shadow-violet-500/30
hover: shadow-2xl shadow-violet-500/40
focus: ring-2 ring-violet-500/50
```

### Interaction
```
Hover translate: (none)
Hover scale: hover:scale-[1.02]
Hover opacity: hover:opacity-90
Transition: transition-all duration-300
Active: active:scale-95
```

### Typefaces
```
Heading: font-bold
Body: font-normal
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-4xl
H3: text-xl md:text-2xl
Body: text-sm md:text-base
Small: text-xs
```

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

### Color roles
```
Background primary: bg-slate-950
Background secondary: bg-slate-900
Background accent: bg-gradient-to-r from-violet-500 to-fuchsia-500, bg-gradient-to-r from-cyan-500 to-blue-500
Text primary: text-white
Text secondary: text-white/80
Text muted: text-white/60
Button primary: bg-gradient-to-r from-violet-600 to-fuchsia-600 text-white
Button secondary: backdrop-blur-xl bg-white/10 border border-white/20 text-white
```

---

## [FORBIDDEN]

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

### Banned classes
- `bg-white`
- `bg-gray-50`
- `bg-slate-50`
- `shadow-sm`
- `shadow-md`
- `text-gray-900`
- `text-black`
- `rounded-none`

### Banned patterns
- matches `^bg-white$`
- matches `^bg-gray-[1-4]00`
- matches `^bg-slate-[1-4]00`
- matches `^text-gray-[89]00`
- matches `^text-black`

### Why they are banned
- `bg-white`: Modern Gradient uses dark backgrounds for contrast
- `shadow-sm`: Use colored shadows: shadow-xl shadow-violet-500/30
- `text-black`: Use text-white or text-white/80 on dark backgrounds

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

---

## [REQUIRED]

### Every button must include
```
px-6 py-3
rounded-2xl
font-medium
transition-all duration-300
```

### Every card must include
```
backdrop-blur-xl
bg-white/10
border border-white/20
rounded-3xl
```

### Every input must include
```
px-5 py-3.5
backdrop-blur-xl
bg-white/10
border border-white/20
rounded-2xl
text-white
placeholder:text-white/40
focus:border-violet-500/50
focus:ring-2 focus:ring-violet-500/20
```

---

## [COMPARE] Modern Gradient 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="px-6 py-3 rounded-2xl font-medium transition-all duration-300 bg-gradient-to-r from-violet-600 to-fuchsia-600 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="backdrop-blur-xl bg-white/10 border border-white/20 rounded-3xl p-6 md:p-8">
 <h3 class="font-bold 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="px-5 py-3.5 backdrop-blur-xl bg-white/10 border border-white/20 rounded-2xl text-white placeholder:text-white/40 focus:border-violet-500/50 focus:ring-2 focus:ring-violet-500/20" placeholder="{PLACEHOLDER}" />
```

---

## [TEMPLATES] Modern Gradient page skeletons

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

### Navigation
```html
<nav class="bg-slate-950 text-white border border-white/20 px-4 md:px-8">
 <div class="flex items-center justify-between max-w-6xl mx-auto gap-6 md:gap-8">
 <a href="/" class="font-bold text-xl md:text-2xl">
 {LOGO_TEXT}
 </a>
 <div class="flex gap-6 md:gap-8 font-normal text-xs">
 {NAV_LINKS}
 </div>
 </div>
</nav>
```

### Hero section
```html
<section class="bg-gradient-to-r from-violet-500 to-fuchsia-500 text-white py-20 md:py-32 px-4 md:px-8">
 <div class="max-w-4xl mx-auto">
 <h1 class="font-bold text-4xl md:text-6xl lg:text-7xl">
 {HEADLINE}
 </h1>
 <p class="font-normal text-sm md:text-base max-w-xl">
 {SUBHEADLINE}
 </p>
 <button class="px-6 py-3 rounded-2xl font-medium transition-all duration-300 bg-gradient-to-r from-violet-600 to-fuchsia-600 text-white">
 {CTA_TEXT}
 </button>
 </div>
</section>
```

### Card grid
```html
<section class="bg-slate-950 text-white py-20 md:py-32 px-4 md:px-8">
 <div class="max-w-6xl mx-auto">
 <h2 class="font-bold text-2xl md:text-4xl">{SECTION_TITLE}</h2>
 <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 md:gap-8">
 <!-- Card template - repeat for each card -->
 <div class="backdrop-blur-xl bg-white/10 border border-white/20 rounded-3xl p-6 md:p-8">
 <h3 class="font-bold text-xl md:text-2xl">{CARD_TITLE}</h3>
 <p class="font-normal text-sm md:text-base text-white/60">{CARD_DESCRIPTION}</p>
 </div>
 </div>
 </div>
</section>
```

### Form input
```html
<input class="px-5 py-3.5 backdrop-blur-xl bg-white/10 border border-white/20 rounded-2xl text-white placeholder:text-white/40 focus:border-violet-500/50 focus:ring-2 focus:ring-violet-500/20" placeholder="{PLACEHOLDER}" />
```

### Footer
```html
<footer class="bg-slate-900 text-white/80 py-20 md:py-32 px-4 md:px-8">
 <div class="max-w-6xl mx-auto">
 <div class="grid grid-cols-1 md:grid-cols-3 gap-8 md:gap-16">
 <div>
 <span class="font-bold text-xl md:text-2xl">{LOGO_TEXT}</span>
 <p class="font-normal text-xs">{TAGLINE}</p>
 </div>
 <div>
 <h4 class="font-bold text-xl md:text-2xl">{COLUMN_TITLE}</h4>
 <ul class="font-normal text-xs">
 {FOOTER_LINKS}
 </ul>
 </div>
 </div>
 </div>
</footer>
```

---

## [CHECKLIST] Modern Gradient post-generation self check

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

### Token check
- [ ] Button includes: `px-6 py-3 rounded-2xl font-medium transition-all duration-300`
- [ ] Card includes: `backdrop-blur-xl bg-white/10 border border-white/20 rounded-3xl`
- [ ] Input includes: `px-5 py-3.5 backdrop-blur-xl bg-white/10 border border-white/20 rounded-2xl text-white placeholder:text-white/40 focus:border-violet-500/50 focus:ring-2 focus:ring-violet-500/20`

### Forbidden check
- [ ] Not using `bg-white`
- [ ] Not using `bg-gray-50`
- [ ] Not using `bg-slate-50`
- [ ] Not using `shadow-sm`
- [ ] Not using `shadow-md`
- [ ] Not using `text-gray-900`
- [ ] Not using `text-black`
- [ ] Not using `rounded-none`

### Style rule check
- [ ] Use bg-gradient-to-r from-violet-500 via-purple-500 to-fuchsia-500 and similar gradients
- [ ] Cards use backdrop-blur-xl bg-white/10 glass effect
- [ ] Buttons use gradient + hover gradient shift effect
- [ ] Dark backgrounds bg-slate-950 or bg-[#1e1b4b]
- [ ] Text uses bg-gradient-to-r bg-clip-text text-transparent gradient effect

### Style drift check
- [ ] Does not violate: Do not use solid color backgrounds (main areas)
- [ ] Does not violate: Do not use monotone gray schemes
- [ ] Does not violate: Do not use sharp corners rounded-none
- [ ] Does not violate: Do not use old-style gradients (e.g. vertical button gradients)
- [ ] Does not violate: Do not overuse gradients causing visual clutter

### 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 Modern Gradient

---

## [EXAMPLES] Example prompts

### 1. 

```
Create a startup landing using Modern Gradient style:
- Full-width hero with animated gradient background
- Floating glass cards with features
- Gradient CTAs with shadow glow
- Stats section with gradient numbers
- Testimonials in glass cards
- Dark footer with gradient accents
- Add decorative glow orbs
```

## Absolute Bans (Match and Refuse)

If any of the following patterns appear, it is a style violation — rewrite without exception.

- use solid color backgrounds (main areas)
- use monotone gray schemes
- use sharp corners rounded-none
- use old-style gradients (e.g. vertical button gradients)
- overuse gradients causing visual clutter
- use dark text on dark gradients

## 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 solid color backgrounds (main areas)
- [ ] do not use monotone gray schemes
- [ ] do not use sharp corners rounded-none
- [ ] do not use old-style gradients (e.g. vertical button gradients)
- [ ] do not overuse gradients causing visual clutter

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

按钮

Modern Gradient 风格的渐变按钮

// Primary Gradient Button // Outline Gradient Button // Glass Button

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

Modern Gradient — Frequently Asked Questions

What is the Modern Gradient design style?
Vibrant modern gradient style with colorful gradient backgrounds, glass-textured cards, and dynamic lighting effects. Ideal for startups, digital products, and event pages. Its core principle: Modern Gradient style creates visual impact and vitality through rich gradient colors and lighting effects.
What colors does Modern Gradient use?
Modern Gradient uses #8b5cf6 as its primary color and #1e1b4b as its secondary color, with accent colors #06b6d4, #ec4899, #f59e0b, #8587ff. Every hex value can be copied from the palette on this page.
How do I apply Modern Gradient correctly?
Key practices: Use bg-gradient-to-r from-violet-500 via-purple-500 to-fuchsia-500 and similar gradients. Cards use backdrop-blur-xl bg-white/10 glass effect. Buttons use gradient + hover gradient shift effect.
What are common mistakes with Modern Gradient?
Avoid: Do not use solid color backgrounds (main areas). Do not use monotone gray schemes. Do not use sharp corners rounded-none.
How do I prompt AI to generate Modern Gradient 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: modern gradient, gradient design, gradient background, mesh gradient.
Global Styles

Global CSS

css
/* Modern Gradient Global Styles */
@layer base {
  body {
    @apply bg-slate-950 text-white antialiased;
  }
}

/* Gradient text utility */
.gradient-text {
  @apply bg-gradient-to-r from-violet-400 via-fuchsia-400 to-pink-400 bg-clip-text text-transparent;
}

/* Glow orb decoration */
.glow-orb {
  @apply absolute blur-3xl opacity-30 pointer-events-none;
}

/* Animated gradient background */
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.animated-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
}
/* Modern Gradient Design Tokens */
:root {
  --modern-gradient-primary: #8b5cf6;
  --modern-gradient-secondary: #1e1b4b;
  --modern-gradient-accent: #06b6d4;
  --modern-gradient-glow: rgba(139, 92, 246, 0.3);
}

.modern-gradient-card {
  position: relative;
  overflow: hidden;
}

.modern-gradient-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), transparent);
  pointer-events: none;
}

.modern-gradient-card:hover::before {
  opacity: 1;
}

.modern-gradient-frosted {
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  background: rgba(139, 92, 246, 0.08);
}

.modern-gradient-accent-corner {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2rem), calc(100% - 2rem) 100%, 0 100%);
}

.modern-gradient-animate-in {
  animation: modern-gradient-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

Modern Gradient style creates visual impact and vitality through rich gradient colors and lighting effects.

Accessibility

Accessibility Score

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

97

Overall Score

Grade: A - Excellent

Contrast Ratios

Score: 100/100Average Ratio: 17.85:1
AA PassAAA Pass
ContextColorsRatioAAAAA
Text on secondary background
/#ffffff / #0f172a
17.85:1

Readability

Score

90/100

Font Size

text-sm md:text-base

Font Weight

font-bold

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.