HomeStylesTemplates
StyleKit
StylesTemplates
  1. Home
  2. /Styles
  3. /Holy Grail Layout
Style Catalog/圣杯布局

圣杯布局

Holy Grail Layout

D
51/100Poor

The classic three-column web layout consisting of a fixed header, a three-column middle section (left navigation, main content, right sidebar), and a fixed footer -- a foundational layout paradigm in web design.

三栏圣杯经典页头页脚侧边栏导航moderncontemporarysleek
View Full Showcase →Templates

Best For

三栏 / 圣杯 / 经典

Primary Move

Use CSS Grid or Flexbox for equal-height three columns

Watch Out

Do not allow unequal column heights

Showcase Entry

Live preview of the showcase page. Click to explore the full experience.

View Full Showcase →

Color Palette

Primary

#1e293b

Secondary

#f1f5f9

Accent 1

#3b82f6

Accent 2

#10b981

Accent 3

#f59e0b

Accent 4

#ef4444

AI ImplementationComponent PreviewReadinessExportsRatings & Feedback

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: Holy Grail Layout
style_slug: holy-grail-layout
style_source: /styles/holy-grail-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 Holy Grail Layout expert. All generated code must strictly follow these constraints:

## Layout Structure

Five regions:
1. Header: Fixed top, brand + navigation
2. Left Sidebar: Fixed width, navigation menu
3. Main Content: Fluid width, primary content
4. Right Sidebar: Fixed width, auxiliary information
5. Footer: Fixed bottom, copyright information

## Implementation Rules

- Use Flexbox: outer flex flex-col min-h-screen
- Three-column area: flex flex-1
- Sidebars: fixed width w-60 / w-64 flex-shrink-0
- Main content: flex-1 min-w-0
- Header: sticky top-0 z-50
- Equal-height columns: three columns auto equal height

## Responsive

Large screens (>1024px): Full three columns
Medium screens (768-1024px): Hide right sidebar
Small screens (<768px): All columns stack vertically

## Animation & Interaction Rules

### Content Supremacy (Card Float)
- Cards in main content: hover:-translate-y-0.5 hover:shadow-md -- minimal, non-distracting float
- NEVER use hover:-translate-y-2 or larger (breaks reading focus)
- Transition: duration-150 ease-out (crisp productivity tool rhythm)

### Navigation Anchoring (Sidebar Links)
- Inactive nav items: hover:border-l-2 hover:border-[#3b82f6] hover:bg-gray-50 -- left-border highlight ONLY
- NEVER add vertical displacement to sidebar nav (anchoring feel requires stability)
- Active item: bg-[#3b82f6]/10 text-[#3b82f6] -- always-visible active state

### Crisp Performance (Duration Standard)
- All transitions: duration-150 ease-out -- productivity tools must feel instant
- NEVER exceed duration-200 for any interactive element

### Button Physics
- Hover: hover:-translate-y-0.5 hover:shadow-[0_4px_10px_rgba(59,130,246,0.4)]
- Active: active:scale-[0.98] active:translate-y-0 active:shadow-none -- tactile micropress
- Focus: focus:ring-2 focus:ring-[#3b82f6] focus:ring-offset-2 (WCAG 2.1 AA)

## Self-check

1. Header fixed at top
2. Three columns equal height
3. Main content area is fluid
4. Sidebars have fixed width
5. Footer always at bottom
6. Responsive collapsing works correctly

Component Templates

Component Preview

按钮

圣杯布局三态按钮:hover:-translate-y-0.5 轻量浮起,active:scale-[0.98] 触觉按压,focus:ring-2 WCAG 焦点环,duration-150 crisp 响应

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

Global CSS

css
/* Holy Grail Layout 全局样式 */

/* 圣杯布局容器 */
.holy-grail {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 页头 */
.holy-grail-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: white;
  border-bottom: 1px solid #e2e8f0;
}

/* 三列主体 */
.holy-grail-body {
  display: flex;
  flex: 1;
}

/* 左侧导航栏 */
.holy-grail-nav {
  width: 240px;
  flex-shrink: 0;
  background: white;
  border-right: 1px solid #e2e8f0;
  padding: 1rem;
}

/* 主内容区 */
.holy-grail-main {
  flex: 1;
  padding: 1.5rem;
  min-width: 0;
}

/* 右侧边栏 */
.holy-grail-aside {
  width: 256px;
  flex-shrink: 0;
  background: white;
  border-left: 1px solid #e2e8f0;
  padding: 1rem;
}

/* 页脚 */
.holy-grail-footer {
  background: white;
  border-top: 1px solid #e2e8f0;
  padding: 1rem 1.5rem;
  text-align: center;
}

/* 响应式 */
@media (max-width: 1024px) {
  .holy-grail-aside {
    display: none;
  }
}

@media (max-width: 768px) {
  .holy-grail-body {
    flex-direction: column;
  }
  .holy-grail-nav {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
}
/* Holy Grail Layout Design Tokens */
:root {
  --holy-grail-layout-primary: #1e293b;
  --holy-grail-layout-secondary: #f1f5f9;
  --holy-grail-layout-accent: #3b82f6;
  --holy-grail-layout-glow: rgba(30, 41, 59, 0.3);
}

@keyframes holy-grail-layout-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes holy-grail-layout-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.holy-grail-layout-card {
  position: relative;
  overflow: hidden;
}

.holy-grail-layout-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.05), transparent);
  pointer-events: none;
}

.holy-grail-layout-card:hover::before {
  opacity: 1;
}

.holy-grail-layout-gradient {
  background: linear-gradient(135deg, #1e293b, #3b82f6);
}

.holy-grail-layout-gradient-text {
  background: linear-gradient(135deg, #1e293b, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.holy-grail-layout-frosted {
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  background: rgba(30, 41, 59, 0.08);
}

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

.holy-grail-layout-animate-in {
  animation: holy-grail-layout-fade-in 0.5s ease-out both;
}

Compatible Visual Styles

Try Pairing

圣杯布局 is a layout pattern that can be paired with the following visual styles.

企业简洁风

Corporate Clean

编辑杂志风

Editorial

Notion 风格

Notion Style

极简扁平风

Minimalist Flat

暗黑模式

Dark Mode

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

Holy Grail Layout is the long-sought classic layout solution in web design, featuring a fixed header and footer with a three-column content area in between. The name originates from the difficulty of implementing this layout in the early days of CSS.

Accessibility

Accessibility Score

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

51

Overall Score

Grade: D - Poor

Contrast Ratios

Score: 43/100Average Ratio: 5.67:1
AA FailAAA Fail
ContextColorsRatioAAAAA
Text on background
/#1e293b / #f1f5f9
13.35:1
Secondary text on background
/#4b5563 / #f1f5f9
6.9:1
Muted text on background
/#9ca3af / #f1f5f9
2.32:1
Text on secondary background
/#1e293b / #ffffff
14.63:1
Secondary text on secondary
/#4b5563 / #ffffff
7.56:1
Button primary
/#ffffff / #3b82f6
3.68:1
Text on accent 1
/#1e293b / #3b82f6
3.98:1
Alt text on accent 1
/#4b5563 / #3b82f6
2.05:1
Text on accent 2
/#1e293b / #10b981
5.77:1
Alt text on accent 2
/#4b5563 / #10b981
2.98:1
Text on accent 3
/#1e293b / #f59e0b
6.81:1
Alt text on accent 3
/#4b5563 / #f59e0b
3.52:1
Text on accent 4
/#1e293b / #ef4444
3.89:1
Alt text on accent 4
/#4b5563 / #ef4444
2.01:1

Readability

Score

68/100

Font Size

text-sm md:text-base

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

Recommended Combinations with Holy Grail Layout

These curated recipes combine this style with layouts and animations, optimized for specific use cases.

Notion-Style Blog

Clean, distraction-free writing experience.

notion-styleholy-grail-layout+1
minimallightdeveloper-friendly

StyleKit

A curated web design style library to help AI generate better-looking websites.

Navigation

StylesTemplatesGuideBlogChangelog

Resources

UI Design PromptsLanding Page PromptsDashboard PromptsTailwind UI PromptsDark Mode UI PromptsGitHub Repository

Stay Updated

By subscribing, you agree to our Privacy Policy and Terms.


Support Maintenance

If StyleKit helps your workflow, voluntary support helps cover servers, domains, and ongoing upkeep.

Scan to support / View all options

(c) 2026 StyleKit. Open source project.

AboutContactPrivacyTermsBuilt with the Editorial style
Stylekit前端样式库stylekit.top陕ICP备2025065501号-3