expressive-style-guide

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

快速参考

Quick Reference

要素规范
背景色
bg-background
(CSS Variable 层定义近黑色调)
前景色
text-foreground
(CSS Variable 层定义高亮白)
强调色
text-primary
/
bg-primary
(单一品牌色)
圆角
rounded-lg
(8px) 或
rounded-xl
(12px)
动效引擎Framer Motion, Spring Physics 优先
视觉模式聚光灯 / 视差 / 形变 / 氛围渐变 / 遮罩揭示 / 浮层玻璃 / 动态排版 (可组合)
对比度WCAG AA (≥4.5:1),暗色背景上的文本必须达标
硬编码 Hex禁止 — 组件层严格使用语义 Token
ElementSpecification
Background Color
bg-background
(Near-black tone defined in CSS Variable layer)
Foreground Color
text-foreground
(Highlighted white defined in CSS Variable layer)
Accent Color
text-primary
/
bg-primary
(Single brand color)
Border Radius
rounded-lg
(8px) or
rounded-xl
(12px)
Animation EngineFramer Motion, Spring Physics preferred
Visual PatternsSpotlight / Parallax / Morph / Ambient Gradient / Mask Reveal / Frosted Overlay / Kinetic Typography (combinable)
ContrastWCAG AA (≥4.5:1), text on dark backgrounds must meet the standard
Hardcoded HexForbidden — Strictly use semantic Tokens at component layer

核心指令 (Core Mandate)

Core Mandate

本规范旨在构建 "影院级质感 (Cinematic UI)""动效极简主义 (Kinetic Minimalism)"。核心在于将界面视为一个受控的摄影舞台,利用光影、材质和摄像机逻辑(运镜)将数字内容提升至艺术品高度。
强制技术栈 (Hard Constraints):
  • UI 库:
    shadcn/ui
    (仅作为底层结构,必须通过
    cn()
    合并样式进行视觉提纯,严禁硬编码样式覆盖系统 Token)。
  • 样式引擎:
    Tailwind CSS
    (严格使用语义化 Token 类,在 CSS Variables 层定义影院色彩)。
  • 动效库:
    Framer Motion
    (核心引擎。Spring Physics 为首选驱动,辅以滚动驱动和视差动效)。
This specification aims to build "Cinematic UI" or "Kinetic Minimalism". The core is to treat the interface as a controlled photographic stage, using light and shadow, materials, and camera logic (camera movement) to elevate digital content to the level of art.
Hard Constraints:
  • UI Library:
    shadcn/ui
    (Only used as underlying structure, must purify visuals by merging styles via
    cn()
    , hardcoded style overrides of system Tokens are strictly prohibited).
  • Styling Engine:
    Tailwind CSS
    (Strictly use semantic Token classes, define cinematic colors in CSS Variables layer).
  • Animation Library:
    Framer Motion
    (Core engine. Spring Physics is the preferred driver, supplemented by scroll-driven and parallax animations).

一、设计哲学:电影感的虚无 (Cinematic Void)

I. Design Philosophy: Cinematic Void

  1. 内容即英雄 (Content as Hero): 界面必须绝对退后。除了内容(图片、音乐、艺术品)本身,所有装饰性元素都应被剥离。
  2. 黑暗画布 (The Dark Canvas): 背景通过 CSS Variables 定义近黑色调 (
    --background
    ),组件层使用
    bg-background
    。利用极高的动态范围,让局部光照产生戏剧性的对比。
  3. 舞台级运镜 (Camera Work): 动画不应是"跳动"或"回弹",而是"平滑的滑轨 (Dolly Zoom)"或"形变 (Morph)"。
  4. 质感的触觉 (Tactile Material): 界面对象应具有质量感和表面反光,模拟物理实体在暗房中的质感。
  1. Content as Hero: The interface must absolutely recede. All decorative elements should be stripped away except for the content itself (images, music, artworks).
  2. The Dark Canvas: Background uses a near-black tone defined in CSS Variables (
    --background
    ), and components use
    bg-background
    . Utilize extremely high dynamic range to create dramatic contrast with local lighting.
  3. Camera Work: Animations should not be "jumpy" or "bouncy", but rather "smooth dolly zoom" or "morph".
  4. Tactile Material: Interface objects should have a sense of mass and surface reflection, simulating the texture of physical entities in a darkroom.

二、基础系统 (System Foundations)

II. System Foundations

1. Token 化色彩系统 (Cinematic Color Tokens)

1. Cinematic Color Tokens

原则: 所有色彩在 CSS Variables 层定义,组件层严格使用 Tailwind 语义类。禁止在组件代码中出现任何硬编码 Hex 值。
CSS Variables 定义(影院色调):
css
:root {
  /* 影院场景下 Light Mode 极少使用,但必须定义 */
  --background: 0 0% 98%;        /* 近白 */
  --foreground: 0 0% 4%;         /* 近黑 */
  --card: 0 0% 96%;
  --card-foreground: 0 0% 4%;
  --primary: 220 90% 56%;        /* 品牌强调色 */
  --primary-foreground: 0 0% 98%;
  --secondary: 0 0% 92%;
  --secondary-foreground: 0 0% 10%;
  --muted: 0 0% 90%;
  --muted-foreground: 0 0% 40%;
  --accent: 0 0% 92%;
  --accent-foreground: 0 0% 10%;
  --border: 0 0% 85%;
  --ring: 220 90% 56%;
}

.dark {
  /* 影院核心色调 — 近黑高对比 */
  --background: 0 0% 2%;         /* 近纯黑画布 */
  --foreground: 0 0% 95%;        /* 高亮白前景 */
  --card: 0 0% 4%;               /* 卡片微提亮 */
  --card-foreground: 0 0% 92%;
  --primary: 220 85% 65%;        /* 光谱偏移后的强调色 */
  --primary-foreground: 0 0% 2%;
  --secondary: 0 0% 8%;
  --secondary-foreground: 0 0% 88%;
  --muted: 0 0% 12%;
  --muted-foreground: 0 0% 55%;
  --accent: 0 0% 10%;
  --accent-foreground: 0 0% 90%;
  --border: 0 0% 14%;            /* 极微弱边界 */
  --ring: 220 85% 65%;
}
组件层用法示例:
tsx
// ✅ 正确 — 使用语义 Token
<div className="bg-background text-foreground">
<div className="bg-card border-border">
<span className="text-muted-foreground">

// ❌ 禁止 — 硬编码 Hex
<div className="bg-[#030303] text-[#ffffff]">
<div style={{ background: '#000000' }}>
Principle: All colors are defined in the CSS Variables layer, and components strictly use Tailwind semantic classes. Hardcoded Hex values are strictly prohibited in component code.
CSS Variables Definition (Cinematic Tones):
css
:root {
  /* Light Mode is rarely used in cinematic scenarios but must be defined */
  --background: 0 0% 98%;        /* Near-white */
  --foreground: 0 0% 4%;         /* Near-black */
  --card: 0 0% 96%;
  --card-foreground: 0 0% 4%;
  --primary: 220 90% 56%;        /* Brand accent color */
  --primary-foreground: 0 0% 98%;
  --secondary: 0 0% 92%;
  --secondary-foreground: 0 0% 10%;
  --muted: 0 0% 90%;
  --muted-foreground: 0 0% 40%;
  --accent: 0 0% 92%;
  --accent-foreground: 0 0% 10%;
  --border: 0 0% 85%;
  --ring: 220 90% 56%;
}

.dark {
  /* Cinematic core palette - near-black high contrast */
  --background: 0 0% 2%;         /* Near-pure black canvas */
  --foreground: 0 0% 95%;        /* Highlighted white foreground */
  --card: 0 0% 4%;               /* Slightly brightened card */
  --card-foreground: 0 0% 92%;
  --primary: 220 85% 65%;        /* Accent color after spectral shift */
  --primary-foreground: 0 0% 2%;
  --secondary: 0 0% 8%;
  --secondary-foreground: 0 0% 88%;
  --muted: 0 0% 12%;
  --muted-foreground: 0 0% 55%;
  --accent: 0 0% 10%;
  --accent-foreground: 0 0% 90%;
  --border: 0 0% 14%;            /* Extremely subtle border */
  --ring: 220 85% 65%;
}
Component Layer Usage Example:
tsx
// ✅ Correct — Use semantic tokens
<div className="bg-background text-foreground">
<div className="bg-card border-border">
<span className="text-muted-foreground">

// ❌ Forbidden — Hardcoded Hex
<div className="bg-[#030303] text-[#ffffff]">
<div style={{ background: '#000000' }}>

2. 光影与反光 (Cinematic Lighting)

2. Cinematic Lighting

光影效果通过 Token 化的
border
opacity
表达,禁止硬编码 RGBA。
  • 抛光边框 (Reflective Sheen): 卡片顶部的微弱反光使用 Token 化边框:
    • Primary Sheen:
      border-t border-foreground/20
      (顶部边缘高亮)
    • Ambient Border:
      border border-border
      (整体微弱边界)
  • 氛围灯 (Ambient Glow): 仅在极其克制的场景下使用背景模糊光晕,不透明度控制在 5-8%
    • bg-primary/5
      bg-primary/8
      作为内容的氛围背景
  • 模糊层级: 弹出层使用
    backdrop-blur-xl
    配合语义背景色:
    • bg-background/80 backdrop-blur-xl
Light and shadow effects are expressed through tokenized
border
and
opacity
, hardcoded RGBA is forbidden.
  • Reflective Sheen: Subtle reflection on card top uses tokenized border:
    • Primary Sheen:
      border-t border-foreground/20
      (Highlighted top edge)
    • Ambient Border:
      border border-border
      (Overall subtle border)
  • Ambient Glow: Use background blur halo only in extremely restrained scenarios, with opacity controlled at 5-8%:
    • bg-primary/5
      or
      bg-primary/8
      as ambient background for content
  • Blur Layers: Popups use
    backdrop-blur-xl
    with semantic background color:
    • bg-background/80 backdrop-blur-xl

3. 动效物理学 (Kinetic Physics)

3. Kinetic Physics

Spring Physics(交互驱动)

Spring Physics (Interaction-driven)

  • 运镜 (Dolly/Morph): 针对布局切换,追求稳重与连贯。
    ts
    const dolly = { type: "spring", stiffness: 280, damping: 28, mass: 1 };
  • 触感 (Tactile Precision): 针对微交互(点击、悬停),快速且无波动。
    ts
    const tactile = { type: "spring", stiffness: 380, damping: 30, mass: 0.8 };
  • 渐现 (Reveal): 针对新元素入场,使用平滑的 Expo 公式。
    ts
    const reveal = { duration: 1, ease: [0.16, 1, 0.3, 1] };
  • Camera Movement (Dolly/Morph): For layout switching, pursue stability and coherence.
    ts
    const dolly = { type: "spring", stiffness: 280, damping: 28, mass: 1 };
  • Tactile Precision: For micro-interactions (clicks, hovers), fast and without oscillation.
    ts
    const tactile = { type: "spring", stiffness: 380, damping: 30, mass: 0.8 };
  • Reveal: For new element entry, use smooth Expo easing.
    ts
    const reveal = { duration: 1, ease: [0.16, 1, 0.3, 1] };

滚动驱动动效 (Scroll-Driven)

Scroll-Driven Animations

  • 视差滚动: 通过
    useScroll
    +
    useTransform
    实现前景/背景差速移动。
    ts
    const { scrollYProgress } = useScroll({ target: ref });
    const y = useTransform(scrollYProgress, [0, 1], ["0%", "-20%"]);
  • 遮罩揭示: 通过
    scrollYProgress
    驱动
    clipPath
    opacity
    渐现。
    ts
    const opacity = useTransform(scrollYProgress, [0.2, 0.6], [0, 1]);
    const clipPath = useTransform(scrollYProgress, [0, 1],
      ["inset(100% 0 0 0)", "inset(0% 0 0 0)"]
    );
  • Parallax Scrolling: Achieve differential movement between foreground/background via
    useScroll
    +
    useTransform
    .
    ts
    const { scrollYProgress } = useScroll({ target: ref });
    const y = useTransform(scrollYProgress, [0, 1], ["0%", "-20%"]);
  • Mask Reveal: Drive
    clipPath
    or
    opacity
    reveal via
    scrollYProgress
    .
    ts
    const opacity = useTransform(scrollYProgress, [0.2, 0.6], [0, 1]);
    const clipPath = useTransform(scrollYProgress, [0, 1],
      ["inset(100% 0 0 0)", "inset(0% 0 0 0)"]
    );

入场编排 (Stagger Orchestration)

Stagger Orchestration

  • 列表/网格子元素使用
    staggerChildren
    实现级联入场:
    ts
    const container = { animate: { transition: { staggerChildren: 0.08 } } };
    const item = {
      initial: { opacity: 0, y: 24 },
      animate: { opacity: 1, y: 0, transition: reveal }
    };
  • List/grid child elements use
    staggerChildren
    for cascading entry:
    ts
    const container = { animate: { transition: { staggerChildren: 0.08 } } };
    const item = {
      initial: { opacity: 0, y: 24 },
      animate: { opacity: 1, y: 0, transition: reveal }
    };

4. 影院排版 (Display Typography)

4. Display Typography

  • Display Heading: 标题应具有戏剧性的对比力。
    • Scale:
      text-5xl
      text-9xl
    • Tracking:
      tracking-tighter
      (-0.05em+)。
    • Color:
      text-foreground
      (严禁硬编码白色)。
  • Mono Secondary: 所有辅助信息(年代、元数据)强制使用 Mono 字体,增强工业精密感。
    • Font:
      JetBrains Mono
      Geist Mono
    • Color:
      text-muted-foreground
  • 正文: 行高
    leading-relaxed
    (1.625),确保暗色背景下的可读性。
  • Display Heading: Headings should have dramatic contrast.
    • Scale:
      text-5xl
      to
      text-9xl
      .
    • Tracking:
      tracking-tighter
      (-0.05em+).
    • Color:
      text-foreground
      (Hardcoded white is strictly prohibited).
  • Mono Secondary: All auxiliary information (year, metadata) must use Mono fonts to enhance industrial precision.
    • Font:
      JetBrains Mono
      or
      Geist Mono
      .
    • Color:
      text-muted-foreground
      .
  • Body Text: Line height
    leading-relaxed
    (1.625) to ensure readability on dark backgrounds.

三、视觉模式菜单 (Visual Mode Palette)

III. Visual Mode Palette

以下模式可独立使用组合叠加,根据内容类型选择最佳搭配。避免在单一项目中滥用所有模式 — 选择 2-3 种建立统一的视觉语言。
The following modes can be used independently or combined and layered. Choose the best combination based on content type. Avoid overusing all modes in a single project — select 2-3 to establish a unified visual language.

1. 聚光灯 (Spotlight)

1. Spotlight

鼠标追踪的局部照明,让内容从黑暗中浮现。
  • 通过
    useMotionTemplate
    +
    useMotionValue
    追踪鼠标坐标生成
    radial-gradient
  • 光圈半径 240-320px,仅受光区域显示边框和精细纹理。
  • 适用: 卡片网格、作品画廊、功能展示。
Mouse-tracking local lighting that makes content emerge from darkness.
  • Track mouse coordinates via
    useMotionTemplate
    +
    useMotionValue
    to generate
    radial-gradient
    .
  • Aperture radius 240-320px, only the illuminated area displays borders and fine textures.
  • Suitable for: Card grids, art galleries, feature showcases.

2. 视差滚动 (Parallax Depth)

2. Parallax Depth

前景/背景分层差速移动,创造空间纵深感。
  • 背景层以 0.3-0.5 倍速跟随滚动,前景以 1.0 倍速。
  • 通过
    useScroll
    +
    useTransform
    映射
    translateY
  • 可叠加
    scale
    变换模拟"推近 (Dolly In)"。
  • 适用: Landing Page Hero、长滚动叙事、产品展示。
Differential movement between foreground/background layers creates spatial depth.
  • Background layer follows scroll at 0.3-0.5x speed, foreground at 1.0x speed.
  • Map
    translateY
    via
    useScroll
    +
    useTransform
    .
  • Can be combined with
    scale
    transform to simulate "dolly in".
  • Suitable for: Landing Page Hero, long-scroll narratives, product showcases.

3. 形变过渡 (Morph Transition)

3. Morph Transition

元素间的形态插值,建立空间连续性。
  • 强制使用 Framer Motion 的
    layoutId
    实现跨视图无缝变形。
  • 封面图在缩略图 → 详情页间进行尺寸/位置/圆角的连续插值。
  • 搭配
    AnimatePresence
    确保退出动画完整。
  • 适用: 详情展开、导航切换、状态过渡。
Morph interpolation between elements establishes spatial continuity.
  • Mandatory use of Framer Motion's
    layoutId
    to achieve seamless cross-view deformation.
  • Cover images perform continuous interpolation of size/position/border-radius between thumbnail → detail page.
  • Combine with
    AnimatePresence
    to ensure complete exit animations.
  • Suitable for: Detail expansion, navigation switching, state transitions.

4. 氛围渐变 (Ambient Gradient)

4. Ambient Gradient

低饱和度动态渐变背景,营造沉浸氛围。
  • 使用
    bg-gradient-to-*
    搭配 Token 化色彩:
    from-background via-muted/10 to-background
  • 可通过
    animate
    缓慢循环渐变角度或位置 (duration: 8-15s)。
  • 饱和度严格控制在 5-15%,禁止高饱和渐变。
  • 适用: 音乐播放器背景、品牌页氛围、加载状态。
Low-saturation dynamic gradient background creates immersive atmosphere.
  • Use
    bg-gradient-to-*
    with tokenized colors:
    from-background via-muted/10 to-background
    .
  • Can slowly cycle gradient angle or position via
    animate
    (duration: 8-15s).
  • Saturation is strictly controlled at 5-15%, high-saturation gradients are forbidden.
  • Suitable for: Music player backgrounds, brand page atmosphere, loading states.

5. 遮罩揭示 (Mask Reveal)

5. Mask Reveal

滚动驱动的内容渐现,创造戏剧性的揭幕效果。
  • 通过
    clipPath
    动画实现几何形状的展开揭示。
  • 支持多种揭示形态:垂直擦除、中心圆扩、对角线切入。
  • 搭配
    opacity
    过渡防止硬边闪烁。
  • 适用: 章节入场、图片展示、时间线节点。
Scroll-driven content reveal creates dramatic unveiling effects.
  • Achieve geometric shape reveal via
    clipPath
    animation.
  • Supports multiple reveal forms: vertical wipe, central circle expansion, diagonal cut-in.
  • Combine with
    opacity
    transition to prevent hard-edge flicker.
  • Suitable for: Section entry, image showcases, timeline nodes.

6. 浮层玻璃 (Frosted Overlay)

6. Frosted Overlay

毛玻璃面板 + 景深模糊,建立层级与聚焦。
  • 面板使用
    bg-background/60 backdrop-blur-xl border border-border
  • 背景层同步应用
    scale(1.02)
    +
    blur(4px)
    模拟景深。
  • 浮层入场使用
    dolly
    spring 参数,退场使用
    reveal
    参数。
  • 适用: Modal/Dialog、侧边栏、详情弹出面板。
Frosted glass panel + depth-of-field blur establishes hierarchy and focus.
  • Panel uses
    bg-background/60 backdrop-blur-xl border border-border
    .
  • Background layer simultaneously applies
    scale(1.02)
    +
    blur(4px)
    to simulate depth of field.
  • Overlay entry uses
    dolly
    spring parameters, exit uses
    reveal
    parameters.
  • Suitable for: Modal/Dialog, sidebar, detail pop-up panels.

7. 微动态排版 (Kinetic Typography)

7. Kinetic Typography

文字入场的戏剧性编排,让排版本身成为视觉焦点。
  • 标题逐字/逐词入场,通过
    staggerChildren: 0.03-0.06
    级联。
  • 每个字符独立应用
    opacity
    +
    y
    +
    filter: blur()
    过渡。
  • 大标题可叠加
    scale
    从 1.1 → 1.0 的微缩放。
  • 适用: Hero 标题、品牌宣言、章节标题。
Dramatic orchestration of text entry makes typography itself a visual focus.
  • Headings enter character-by-character or word-by-word, cascaded via
    staggerChildren: 0.03-0.06
    .
  • Each character independently applies
    opacity
    +
    y
    +
    filter: blur()
    transitions.
  • Large headings can be combined with a slight scale transform from 1.1 → 1.0.
  • Suitable for: Hero headings, brand declarations, section titles.

四、组件实现 (Implementation Specs)

IV. Implementation Specs

shadcn/ui 影院化改造 (Cinematic Overrides)

Cinematic Overrides for shadcn/ui

所有改造通过
cn()
合并样式,使用语义 Token,禁止硬编码颜色值。
All modifications merge styles via
cn()
, use semantic tokens, and hardcoded color values are forbidden.

Button

Button

tsx
// Primary — 高对比动作按钮
<Button className={cn(
  "bg-primary text-primary-foreground",
  "rounded-lg tracking-wide font-medium",
  "transition-none" // 由 Framer Motion 接管
)}>
  <motion.span whileTap={{ scale: 0.97 }} transition={tactile}>
    Action
  </motion.span>
</Button>

// Ghost — 影院幽灵按钮
<Button variant="ghost" className={cn(
  "text-muted-foreground hover:text-foreground",
  "hover:bg-accent/50"
)}>
  Secondary
</Button>
tsx
// Primary — High-contrast action button
<Button className={cn(
  "bg-primary text-primary-foreground",
  "rounded-lg tracking-wide font-medium",
  "transition-none" // Handled by Framer Motion
)}>
  <motion.span whileTap={{ scale: 0.97 }} transition={tactile}>
    Action
  </motion.span>
</Button>

// Ghost — Cinematic ghost button
<Button variant="ghost" className={cn(
  "text-muted-foreground hover:text-foreground",
  "hover:bg-accent/50"
)}>
  Secondary
</Button>

Card (影院卡片)

Card (Cinematic Card)

tsx
<motion.div className={cn(
  "bg-card border border-border rounded-xl overflow-hidden",
  "border-t-foreground/15" // 顶部反光 Sheen
)}>
  {/* 封面图默认降低亮度,交互时恢复 */}
  <motion.img
    className="w-full object-cover brightness-[0.6]"
    whileHover={{ brightness: 1 }}
  />
  <div className="p-6">
    <h3 className="text-foreground text-lg font-semibold tracking-tight">
      {title}
    </h3>
    <p className="text-muted-foreground text-sm font-mono mt-1">
      {metadata}
    </p>
  </div>
</motion.div>
tsx
<motion.div className={cn(
  "bg-card border border-border rounded-xl overflow-hidden",
  "border-t-foreground/15" // Top reflective sheen
)}>
  {/* Cover image defaults to reduced brightness, restores on interaction */}
  <motion.img
    className="w-full object-cover brightness-[0.6]"
    whileHover={{ brightness: 1 }}
  />
  <div className="p-6">
    <h3 className="text-foreground text-lg font-semibold tracking-tight">
      {title}
    </h3>
    <p className="text-muted-foreground text-sm font-mono mt-1">
      {metadata}
    </p>
  </div>
</motion.div>

Dialog (影院弹出层)

Dialog (Cinematic Popup)

tsx
<Dialog>
  <DialogOverlay className={cn(
    "bg-background/80 backdrop-blur-xl"
  )} />
  <DialogContent className={cn(
    "bg-card border border-border rounded-xl",
    "shadow-none"
  )}>
    {/* 内容使用 AnimatePresence 编排入场 */}
    <AnimatePresence mode="wait">
      <motion.div
        initial={{ opacity: 0, y: 16 }}
        animate={{ opacity: 1, y: 0 }}
        exit={{ opacity: 0, y: -8 }}
        transition={dolly}
      >
        {children}
      </motion.div>
    </AnimatePresence>
  </DialogContent>
</Dialog>
tsx
<Dialog>
  <DialogOverlay className={cn(
    "bg-background/80 backdrop-blur-xl"
  )} />
  <DialogContent className={cn(
    "bg-card border border-border rounded-xl",
    "shadow-none"
  )}>
    {/* Content uses AnimatePresence for entry orchestration */}
    <AnimatePresence mode="wait">
      <motion.div
        initial={{ opacity: 0, y: 16 }}
        animate={{ opacity: 1, y: 0 }}
        exit={{ opacity: 0, y: -8 }}
        transition={dolly}
      >
        {children}
      </motion.div>
    </AnimatePresence>
  </DialogContent>
</Dialog>

Navigation (影院导航)

Navigation (Cinematic Navigation)

tsx
<nav className={cn(
  "fixed top-0 w-full z-50",
  "bg-background/60 backdrop-blur-lg border-b border-border"
)}>
  <div className="flex items-center justify-between px-8 h-16">
    <span className="text-foreground font-semibold tracking-tight">
      {brand}
    </span>
    <div className="flex gap-6 text-muted-foreground">
      {links.map(link => (
        <motion.a
          key={link.href}
          className="hover:text-foreground transition-colors"
          whileHover={{ y: -1 }}
          transition={tactile}
        >
          {link.label}
        </motion.a>
      ))}
    </div>
  </div>
</nav>
tsx
<nav className={cn(
  "fixed top-0 w-full z-50",
  "bg-background/60 backdrop-blur-lg border-b border-border"
)}>
  <div className="flex items-center justify-between px-8 h-16">
    <span className="text-foreground font-semibold tracking-tight">
      {brand}
    </span>
    <div className="flex gap-6 text-muted-foreground">
      {links.map(link => (
        <motion.a
          key={link.href}
          className="hover:text-foreground transition-colors"
          whileHover={{ y: -1 }}
          transition={tactile}
        >
          {link.label}
        </motion.a>
      ))}
    </div>
  </div>
</nav>

非对称 Bento 网格 (Asymmetric Grid)

Asymmetric Bento Grid

网格打破等宽单调性,创造视觉节奏:
  • Hero Item:
    col-span-2 row-span-2
    — 主视觉焦点。
  • Vertical/Square: 交错排列,创造视觉节奏。
  • Gap:
    gap-4
    gap-6
    ,使用 Token 化间距。
  • Mobile: 间距折半 (
    gap-2
    ),但保持足够的内衬空间 (
    p-4
    )。
tsx
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6">
  <div className="col-span-2 row-span-2">{/* Hero Card */}</div>
  <div className="col-span-1">{/* Vertical Card */}</div>
  <div className="col-span-1">{/* Square Card */}</div>
</div>
The grid breaks equal-width monotony to create visual rhythm:
  • Hero Item:
    col-span-2 row-span-2
    — Main visual focus.
  • Vertical/Square: Staggered arrangement to create visual rhythm.
  • Gap:
    gap-4
    or
    gap-6
    , use tokenized spacing.
  • Mobile: Halve the spacing (
    gap-2
    ), but maintain sufficient padding (
    p-4
    ).
tsx
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6">
  <div className="col-span-2 row-span-2">{/* Hero Card */}</div>
  <div className="col-span-1">{/* Vertical Card */}</div>
  <div className="col-span-1">{/* Square Card */}</div>
</div>

共享元素跳转 (Shared Element Transition)

Shared Element Transition

  • 强制使用 Framer Motion 的
    layoutId
  • 封面图必须在形态间进行无缝插值过渡,严禁出现页面间的瞬间闪烁或硬切。
  • 搭配
    AnimatePresence
    管理组件生命周期。
tsx
<motion.div layoutId={`card-${id}`} transition={dolly}>
  <motion.img layoutId={`image-${id}`} src={cover} />
</motion.div>
  • Mandatory use of Framer Motion's
    layoutId
    .
  • Cover images must perform seamless interpolation transitions between forms, and instant flicker or hard cuts between pages are strictly prohibited.
  • Combine with
    AnimatePresence
    to manage component lifecycle.
tsx
<motion.div layoutId={`card-${id}`} transition={dolly}>
  <motion.img layoutId={`image-${id}`} src={cover} />
</motion.div>

五、代码审查清单 (The Cinematic Audit)

V. The Cinematic Audit

Token 合规

Token Compliance

  • Token Check — 组件代码中是否存在硬编码 Hex (如
    #030303
    ,
    #ffffff
    )?所有颜色是否使用
    bg-background
    /
    text-foreground
    /
    border-border
    等语义类?
  • CSS Variable Check — 影院色调是否在
    :root
    /
    .dark
    的 CSS Variables 中正确定义?
  • Token Check — Are there hardcoded Hex values (e.g.,
    #030303
    ,
    #ffffff
    ) in component code? Do all colors use semantic classes like
    bg-background
    /
    text-foreground
    /
    border-border
    ?
  • CSS Variable Check — Are cinematic tones correctly defined in
    :root
    /
    .dark
    CSS Variables?

视觉与材质

Visual & Material

  • Lighting Logic — 是否合理使用了光影效果?是否避免了全向均匀照明?
  • Material Check — 所有容器是否具备顶部反光 (
    border-t-foreground/15
    )?边框是否使用
    border-border
  • Imagery Authenticity — 封面是否为高质量摄影或 3D 渲染?是否存在廉价的矢量或渐变占位?
  • Lighting Logic — Are light and shadow effects used appropriately? Is omnidirectional uniform lighting avoided?
  • Material Check — Do all containers have top reflection (
    border-t-foreground/15
    )? Do borders use
    border-border
    ?
  • Imagery Authenticity — Are cover images high-quality photography or 3D renders? Are there cheap vector or gradient placeholders?

动效质量

Animation Quality

  • Physics Check — 交互动效是否使用 Spring Physics?是否存在线性或 ease-in-out 动画?Damping 是否足够大以保证稳定性?
  • Continuity Check — 图片转换是否应用了
    layoutId
    ?详情页入场是否使用了
    AnimatePresence
  • Scroll Motion Check — 是否合理使用了滚动驱动动效 (视差/遮罩揭示)?是否存在不必要的 JS 滚动监听?
  • Physics Check — Do interaction animations use Spring Physics? Are there linear or ease-in-out animations? Is damping sufficient to ensure stability?
  • Continuity Check — Are
    layoutId
    applied to image transitions? Does detail page entry use
    AnimatePresence
    ?
  • Scroll Motion Check — Are scroll-driven animations (parallax/mask reveal) used appropriately? Are there unnecessary JS scroll listeners?

模式多样性

Pattern Diversity

  • Variety Check — 项目是否过度依赖单一视觉模式 (如仅使用聚光灯)?是否根据内容类型选择了 2-3 种互补模式?
  • Composition Check — 多种模式叠加时,是否保持了视觉克制?是否存在过度堆叠导致的性能问题或审美疲劳?
  • Variety Check — Does the project over-rely on a single visual pattern (e.g., only using spotlight)? Are 2-3 complementary patterns selected based on content type?
  • Composition Check — When multiple patterns are layered, is visual restraint maintained? Are there performance issues or aesthetic fatigue caused by over-stacking?

可访问性

Accessibility

  • Contrast Safety — 暗色背景上的所有文本 (尤其是
    text-muted-foreground
    ) 对比度是否 ≥ 4.5:1?
  • Motion Safety — 是否尊重
    prefers-reduced-motion
    ?开启后是否禁用视差和复杂入场动画?
  • Contrast Safety — Does all text on dark backgrounds (especially
    text-muted-foreground
    ) meet a contrast ratio of ≥ 4.5:1?
  • Motion Safety — Is
    prefers-reduced-motion
    respected? Are parallax and complex entry animations disabled when enabled?

参考资源

Reference Resources

  • 示例项目:
    example/
    目录包含一个名为 Aero Music 的完整演示应用,展示了 Bento 布局、聚光灯遮罩及摄像机运镜的完整实现。

  • Example Project: The
    example/
    directory contains a complete demo app called Aero Music, showcasing the full implementation of Bento layout, spotlight mask, and camera movement.

合成笔记 (Composition Notes)

Composition Notes

本节供
design-director
技能在多风格融合场景中使用。定义本风格指南中哪些属性是硬约束(即使在混合模式下也不可覆盖),哪些是软约束(可由 Director 根据项目需求调整)。
This section is for the
design-director
skill to use in multi-style fusion scenarios. Define which attributes in this style guide are hard constraints (cannot be overridden even in mixed modes) and which are soft constraints (can be adjusted by the Director based on project needs).

硬约束 (Hard Constraints — 不可覆盖)

Hard Constraints — Non-overridable

ID属性规范值理由
E.H1动效引擎Framer Motion, Spring Physics 优先影院质感的核心驱动,替换为 CSS transition 将失去全部视觉特征
E.H2暗色画布深色背景作为默认画布(Expressive 区域内)光影戏剧感依赖于暗色基底,浅色背景无法实现聚光灯、氛围渐变等核心视觉模式
E.H3Token 化禁止硬编码 Hex,组件层使用语义 Token跨风格融合的基础设施,所有风格共享此约束
E.H4内容即英雄装饰性元素必须退后于内容(图片、音乐、作品)本风格的核心哲学——界面退场,内容登台
E.H5对比度WCAG AA (≥4.5:1)无障碍强制要求,暗色背景上的浅色文字尤其需要检查
IDAttributeSpecification ValueReason
E.H1Animation EngineFramer Motion, Spring Physics preferredCore driver of cinematic texture. Replacing with CSS transitions will lose all visual characteristics
E.H2Dark CanvasDark background as default canvas (within Expressive areas)Light and shadow drama relies on dark base. Light backgrounds cannot implement core visual patterns like spotlight and ambient gradient
E.H3TokenizationHardcoded Hex forbidden, semantic tokens used at component layerInfrastructure for cross-style fusion, shared by all styles
E.H4Content as HeroDecorative elements must recede behind content (images, music, works)Core philosophy of this style — interface recedes, content takes center stage
E.H5ContrastWCAG AA (≥4.5:1)Mandatory accessibility requirement, especially for light text on dark backgrounds

软约束 (Soft Constraints — 可由 Director 覆盖)

Soft Constraints — Overridable by Director

ID属性默认值Director 可调整范围触发条件
E.S1圆角
rounded-lg
(8px) /
rounded-xl
(12px)
可降至
rounded-md
(6px)
当 Minimal 为项目主风格,Expressive 仅用于辅助区域时
E.S2动效时长上限0.3–1.5s(完整影院运镜)上限可降至 0.8s当项目整体节奏偏快,或 Minimal/Swiss 为主风格时
E.S3色彩空间HSL可转换为 oklch混合项目中推荐统一使用 oklch——感知均匀性更好,渐变接缝更自然
E.S4暗色背景明度
hsl(0 0% 2%)
/
oklch(0.08 0 0)
近纯黑
可提亮至
oklch(0.145 0 0)
≈ #1A1A1A
当需要与 Minimal/Swiss 区域统一暗色模式基准时
E.S5非对称 Bento 网格自由非对称布局可对齐到 8pt 基线网格(列宽和间距为 8px 倍数)当 Swiss 为项目中的任一风格,需要全局网格对齐时
E.S6Stagger 间隔0.08s可缩短至 0.04–0.06s当项目整体节奏偏快时
E.S7视差滚动强度0.3–0.5 倍速差可降至 0.1–0.2 倍速差当 Minimal 为主风格,需要更克制的滚动体验时
IDAttributeDefault ValueDirector Adjustable RangeTrigger Condition
E.S1Border Radius
rounded-lg
(8px) /
rounded-xl
(12px)
Can be reduced to
rounded-md
(6px)
When Minimal is the main project style and Expressive is only used for auxiliary areas
E.S2Animation Duration Upper Limit0.3–1.5s (complete cinematic camera movement)Upper limit can be reduced to 0.8sWhen the overall project rhythm is fast, or Minimal/Swiss is the main style
E.S3Color SpaceHSLCan be converted to oklchRecommended to unify with oklch in mixed projects — better perceptual uniformity, more natural gradient seams
E.S4Dark Background Lightness
hsl(0 0% 2%)
/
oklch(0.08 0 0)
near pure black
Can be brightened to
oklch(0.145 0 0)
≈ #1A1A1A
When needing to unify dark mode baseline with Minimal/Swiss areas
E.S5Asymmetric Bento GridFree asymmetric layoutCan be aligned to 8pt baseline grid (column width and spacing are multiples of 8px)When Swiss is one of the project styles and global grid alignment is required
E.S6Stagger Interval0.08sCan be shortened to 0.04–0.06sWhen the overall project rhythm is fast
E.S7Parallax Scroll Intensity0.3–0.5x speed differenceCan be reduced to 0.1–0.2x speed differenceWhen Minimal is the main style and a more restrained scrolling experience is needed