风格目录/Linear 风格

Linear 风格

Linear Style

B
82/100良好
给这个风格评分

受 Linear 应用启发的极简暗色设计风格。精确的排版、克制的动效、开发者审美的极致表达。深色背景配合微妙的渐变和精细的边框。

Linear极简暗色开发者精确工具minimalcleansimple留白
查看完整 Showcase →
模板

适合场景

Linear / 极简 / 暗色

设计重点

背景使用近黑 bg-[#0a0a0b] 或 bg-zinc-950

注意事项

禁止使用白色/浅色背景(暗色是根基)

AI 实现文档

先复制硬性提示词,需要时再看设计规范

默认用硬性提示词让 AI 直接生成前端;Design Spec 用来理解、改写和审核风格;Creative Brief 用来早期探索方向。

硬性提示词

默认使用它:复制后追加具体需求,让 AI 直接生成一致、可落地的前端。

什么时候用

  • 要 AI 直接生成页面或组件
  • 需要多轮输出保持一致
  • 担心风格跑偏或变丑

怎么用

  • 复制完整提示词
  • 后面追加具体需求
  • 生成后按禁止项和状态规则检查
STYLEKIT_STYLE_REFERENCE
style_name: Linear 风格
style_slug: linear-style
style_source: /styles/linear-style

# Hard Prompt

## 什么时候用
当你希望 AI 严格按风格规则生成代码时使用。它是生产界面最稳的默认选择。

## 怎么用
- 把完整提示词复制到 ChatGPT、Claude、Cursor 或其他编码助手。
- 在提示词后追加具体产品、页面或组件需求。
- 生成后按禁止项和交互状态检查,确认没有风格漂移。

请严格遵守以下风格规则并保持一致性,禁止风格漂移。

## 执行要求

- 优先保证风格一致性,其次再做创意延展。
- 遇到冲突时以禁止项为最高优先级。
- 输出前自检:颜色、排版、间距、交互是否仍属于该风格。

## Style Rules

You are a Linear Style design expert. This style emulates the design language of the Linear project management tool — precise, restrained, and developer-focused.

## 绝对禁止

- 禁止使用白色/浅色背景(暗色是根基)
- 禁止使用彩色阴影或大面积阴影
- 禁止使用多种字体(只用 Inter)
- 禁止使用饱和度过高的颜色(除品牌紫色外)
- 禁止装饰性元素(渐变背景、blob、噪点纹理等)

## 必须遵守

- 背景使用近黑 bg-[#0a0a0b] 或 bg-zinc-950
- 文字使用 text-white 和 text-zinc-400 双层级
- 边框使用 border border-white/10
- 按钮渐变 bg-gradient-to-r from-[#5e6ad2] to-[#8b5cf6]
- 字体使用 Inter,tracking-tight 或 -tracking-[0.01em]
- 交互使用 opacity 变化而非颜色变化 hover:text-white
- 圆角克制 rounded-lg 为最大值
- 使用 backdrop-blur-sm 为浮层增加质感

## Absolute Rules
- Background: #0a0a0b or bg-zinc-950 — always dark
- Text: text-white for primary, text-zinc-400 for secondary, text-zinc-500/600 for tertiary
- Borders: border border-white/10 — always 1px, always semi-transparent
- Brand color: #5e6ad2 (indigo-purple) — used sparingly for CTAs and accents
- Font: Inter only, tracking-tight, text-sm as default body size
- Border-radius: rounded-lg max, rounded-md for small elements

## Interaction Pattern
- Use opacity for hover states: hover:opacity-90 or hover:bg-white/[0.06]
- Transitions must be fast: duration-150
- No scale transforms on hover
- Focus: focus:border-[#5e6ad2]/50

## Typography Scale
- Hero: text-4xl font-semibold tracking-tight
- Section: text-2xl font-semibold tracking-tight
- Body: text-sm text-zinc-400
- Label: text-xs text-zinc-500 font-medium uppercase tracking-wider

---

# Linear Style (Linear 风格) Design System

> 受 Linear 应用启发的极简暗色设计风格。精确的排版、克制的动效、开发者审美的极致表达。深色背景配合微妙的渐变和精细的边框。

## 核心理念

Linear Style 源自备受开发者推崇的项目管理工具 Linear。其设计理念是"每一个像素都有目的"。

核心理念:
- 深色优先:几乎纯黑的背景(#0a0a0b),让内容成为唯一焦点
- 精确排版:Inter 字体,letter-spacing 微调,恰到好处的行高
- 克制渐变:紫色渐变仅用于主要 CTA 和品牌元素
- 微妙边框:1px 的半透明白色边框划分层级
- 无多余装饰:没有阴影、没有圆角过大的元素、没有花哨的效果

设计原则:
- 视觉一致性:所有组件必须遵循统一的视觉语言,从色彩到字体到间距保持谐调
- 层次分明:通过颜色深浅、字号大小、留白空间建立清晰的信息层级
- 交互反馈:每个可交互元素都必须有明确的 hover、active、focus 状态反馈
- 响应式适配:设计必须在移动端、平板、桌面端上保持一致的体验
- 无障碍性:确保色彩对比度符合 WCAG 2.1 AA 标准,所有交互元素可键盘访问

---

## Token 字典(精确 Class 映射)

### 边框
```
宽度: border
颜色: border-white/10
圆角: rounded-lg
```

### 阴影
```
小: shadow-none
中: shadow-none
大: shadow-none
悬停: shadow-none
聚焦: shadow-none
```

### 交互效果
```
悬停位移: 
悬停缩放: (无)
悬停透明度: (无)
过渡动画: transition-all duration-150
按下状态: active:opacity-80
```

### 字体
```
标题: font-sans font-semibold tracking-tight
正文: font-sans text-sm
等宽: font-mono
```

### 字号
```
Hero: text-4xl font-semibold tracking-tight
H1: text-2xl font-semibold tracking-tight
H2: text-xl font-semibold tracking-tight
H3: text-base font-medium tracking-tight
正文: text-sm
小字: text-xs
```

### 间距
```
Section: py-12 md:py-20
容器: px-4 md:px-8
卡片: p-5
小间距: gap-1.5
中间距: gap-3
大间距: gap-5
```

### 颜色角色
```
背景主色: bg-[#0a0a0b]
背景辅色: bg-white/[0.03]
背景强调色: bg-[#5e6ad2]
正文主色: text-white
正文辅色: text-zinc-400
正文弱化色: text-zinc-500
按钮主色: bg-gradient-to-r from-[#5e6ad2] to-[#8b5cf6] text-white
按钮辅色: bg-white/[0.03] text-white border border-white/10
```

---

## [FORBIDDEN] 绝对禁止

以下 class 在本风格中**绝对禁止使用**,生成时必须检查并避免:

### 禁止的 Class
- `bg-white`
- `bg-gray-50`
- `bg-gray-100`
- `bg-slate-50`
- `rounded-2xl`
- `rounded-3xl`
- `rounded-full`
- `shadow-sm`
- `shadow-md`
- `shadow-lg`
- `shadow-xl`
- `shadow-purple-500/20`
- `shadow-indigo-500/20`
- `font-serif`
- `font-mono`
- `text-pink-400`
- `text-green-400`
- `text-orange-400`

### 禁止的模式
- 匹配 `^bg-(?:white|gray-(?:50|100)|slate-50)$`
- 匹配 `^rounded-(?:2xl|3xl|full)$`
- 匹配 `^shadow-(?:sm|md|lg|xl|2xl)$`
- 匹配 `^shadow-.*\/\d+$`
- 匹配 `^font-(?:serif|mono)$`

### 禁止原因
- `bg-white`: Linear Style uses dark backgrounds only (#0a0a0b)
- `rounded-2xl`: Linear Style uses rounded-lg max for restrained aesthetics
- `shadow-sm`: Linear Style avoids shadows entirely; uses borders for hierarchy
- `font-serif`: Linear Style uses Inter (sans-serif) exclusively
- `font-mono`: Linear Style uses Inter (sans-serif) exclusively for UI text

> WARNING: 如果你的代码中包含以上任何 class,必须立即替换。

---

## [REQUIRED] 必须包含

### 按钮必须包含
```
rounded-lg
font-medium
text-sm
transition-opacity duration-150
```

### 卡片必须包含
```
rounded-lg
border border-white/10
bg-white/[0.03]
```

### 输入框必须包含
```
rounded-lg
border border-white/10
bg-white/[0.03]
text-white text-sm
focus:outline-none
```

---

## [COMPARE] Linear Style 错误 vs 正确对比

以下错误示例只代表“未经过当前风格适配的通用默认值”,不要把错误示例当成视觉建议。

### 按钮

[WRONG] **错误示例**(通用组件库默认样式,不要直接复制):
```html
<button class="{GENERIC_LIBRARY_BUTTON_DEFAULT}">
  点击我
</button>
```

[CORRECT] **正确示例**(使用当前风格的 token):
```html
<button class="rounded-lg font-medium text-sm transition-opacity duration-150 bg-gradient-to-r from-[#5e6ad2] to-[#8b5cf6] text-white">
  点击我
</button>
```

### 卡片

[WRONG] **错误示例**(未经当前风格适配的通用卡片):
```html
<div class="{GENERIC_LIBRARY_CARD_DEFAULT}">
  <h3>{TITLE}</h3>
</div>
```

[CORRECT] **正确示例**(使用当前风格的 card token):
```html
<div class="rounded-lg border border-white/10 bg-white/[0.03] p-5">
  <h3 class="font-sans font-semibold tracking-tight text-base font-medium tracking-tight">{TITLE}</h3>
</div>
```

### 输入框

[WRONG] **错误示例**(未经当前风格适配的通用输入框):
```html
<input class="{GENERIC_LIBRARY_INPUT_DEFAULT}" />
```

[CORRECT] **正确示例**(使用当前风格的 input token):
```html
<input class="rounded-lg border border-white/10 bg-white/[0.03] text-white text-sm focus:outline-none" placeholder="{PLACEHOLDER}" />
```

---

## [TEMPLATES] Linear Style 页面骨架模板

以下骨架只使用当前风格的 token。替换 `{PLACEHOLDER}` 时,不要移除或替换这些 token:

### 导航栏骨架
```html
<nav class="bg-[#0a0a0b] text-white border border-white/10 px-4 md:px-8">
  <div class="flex items-center justify-between max-w-6xl mx-auto gap-3">
    <a href="/" class="font-sans font-semibold tracking-tight text-base font-medium tracking-tight">
      {LOGO_TEXT}
    </a>
    <div class="flex gap-3 font-sans text-sm text-xs">
      {NAV_LINKS}
    </div>
  </div>
</nav>
```

### Hero 区块骨架
```html
<section class="bg-[#5e6ad2] text-white py-12 md:py-20 px-4 md:px-8">
  <div class="max-w-4xl mx-auto">
    <h1 class="font-sans font-semibold tracking-tight text-4xl font-semibold tracking-tight">
      {HEADLINE}
    </h1>
    <p class="font-sans text-sm text-sm max-w-xl">
      {SUBHEADLINE}
    </p>
    <button class="rounded-lg font-medium text-sm transition-opacity duration-150 bg-gradient-to-r from-[#5e6ad2] to-[#8b5cf6] text-white">
      {CTA_TEXT}
    </button>
  </div>
</section>
```

### 卡片网格骨架
```html
<section class="bg-[#0a0a0b] text-white py-12 md:py-20 px-4 md:px-8">
  <div class="max-w-6xl mx-auto">
    <h2 class="font-sans font-semibold tracking-tight text-xl font-semibold tracking-tight">{SECTION_TITLE}</h2>
    <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3">
      <!-- Card template - repeat for each card -->
      <div class="rounded-lg border border-white/10 bg-white/[0.03] p-5">
        <h3 class="font-sans font-semibold tracking-tight text-base font-medium tracking-tight">{CARD_TITLE}</h3>
        <p class="font-sans text-sm text-sm text-zinc-500">{CARD_DESCRIPTION}</p>
      </div>
    </div>
  </div>
</section>
```

### 表单输入骨架
```html
<input class="rounded-lg border border-white/10 bg-white/[0.03] text-white text-sm focus:outline-none" placeholder="{PLACEHOLDER}" />
```

### 页脚骨架
```html
<footer class="bg-white/[0.03] text-zinc-400 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-5">
      <div>
        <span class="font-sans font-semibold tracking-tight text-base font-medium tracking-tight">{LOGO_TEXT}</span>
        <p class="font-sans text-sm text-xs">{TAGLINE}</p>
      </div>
      <div>
        <h4 class="font-sans font-semibold tracking-tight text-base font-medium tracking-tight">{COLUMN_TITLE}</h4>
        <ul class="font-sans text-sm text-xs">
          {FOOTER_LINKS}
        </ul>
      </div>
    </div>
  </div>
</footer>
```

---

## [CHECKLIST] Linear Style 生成后自检清单

**输出代码前,逐项验证当前风格的 token 和规则。如有违反,先修正再交付:**

### Token 检查
- [ ] 按钮包含: `rounded-lg font-medium text-sm transition-opacity duration-150`
- [ ] 卡片包含: `rounded-lg border border-white/10 bg-white/[0.03]`
- [ ] 输入框包含: `rounded-lg border border-white/10 bg-white/[0.03] text-white text-sm focus:outline-none`

### 禁止项检查
- [ ] 没有使用 `bg-white`
- [ ] 没有使用 `bg-gray-50`
- [ ] 没有使用 `bg-gray-100`
- [ ] 没有使用 `bg-slate-50`
- [ ] 没有使用 `rounded-2xl`
- [ ] 没有使用 `rounded-3xl`
- [ ] 没有使用 `rounded-full`
- [ ] 没有使用 `shadow-sm`

### 风格规则检查
- [ ] 背景使用近黑 bg-[#0a0a0b] 或 bg-zinc-950
- [ ] 文字使用 text-white 和 text-zinc-400 双层级
- [ ] 边框使用 border border-white/10
- [ ] 按钮渐变 bg-gradient-to-r from-[#5e6ad2] to-[#8b5cf6]
- [ ] 字体使用 Inter,tracking-tight 或 -tracking-[0.01em]

### 风格漂移检查
- [ ] 没有违反:禁止使用白色/浅色背景(暗色是根基)
- [ ] 没有违反:禁止使用彩色阴影或大面积阴影
- [ ] 没有违反:禁止使用多种字体(只用 Inter)
- [ ] 没有违反:禁止使用饱和度过高的颜色(除品牌紫色外)
- [ ] 没有违反:禁止装饰性元素(渐变背景、blob、噪点纹理等)

### 通用交付检查
- [ ] 响应式布局在手机、平板和桌面下稳定,没有横向溢出
- [ ] 所有交互元素有清晰焦点、可访问名称和 reduced-motion 方案
- [ ] 文本对比度达到 WCAG AA,且没有用颜色单独传递状态
- [ ] 结果仍然能够一眼识别为 Linear Style

---

## [EXAMPLES] 示例 Prompt

### 1. 项目管理 Dashboard

Linear 风格的项目看板,包含 issue 列表和状态管理

```
Create a project management dashboard in Linear style. Include a sidebar with workspace navigation, a main area with issue list (showing status icons, issue IDs, titles, labels, and assignees), and a top bar with filters. Use #0a0a0b background, border-white/10 borders, and #5e6ad2 for the primary action button.
```

### 2. SaaS 着陆页

生成 Linear 风格风格的 SaaS 产品着陆页

```
Create a SaaS landing page using Linear Style style with hero section, feature grid, testimonials, pricing table, and footer.
```

### 3. 作品集展示

生成 Linear 风格风格的作品集页面

```
Create a portfolio showcase page using Linear Style style with project grid, about section, contact form, and consistent visual language.
```

## 绝对禁止(匹配即拒绝)

以下模式一旦出现,视为风格违规——不找借口,直接重写。

- 使用白色/浅色背景(暗色是根基)
- 使用彩色阴影或大面积阴影
- 使用多种字体(只用 Inter)
- 使用饱和度过高的颜色(除品牌紫色外)
- 装饰性元素(渐变背景、blob、噪点纹理等)

## 自检清单(交付前逐条确认)

如果任何一条不通过,说明风格漂移了——修改后再交付。

- [ ] 没有紫色到蓝色的渐变
- [ ] 没有使用 Inter / Roboto / Geist 等过度使用的字体
- [ ] 没有嵌套卡片(卡片里面套卡片)
- [ ] 没有在彩色背景上放灰色文字
- [ ] 正文对比度满足 WCAG AA(≥4.5:1)
- [ ] 没有 bounce / elastic 缓动曲线
- [ ] 动效有 prefers-reduced-motion 备选方案
- [ ] 正文行宽不超过 65-75 个字符
- [ ] 没有单侧粗边框装饰(border-left/right accent stripe)
- [ ] 没有渐变文字(background-clip: text)
- [ ] 没有把玻璃态(glassmorphism)当作默认风格
- [ ] 没有 tiny uppercase tracked eyebrow 放在每个 section 标题上面
- [ ] 禁止使用白色/浅色背景(暗色是根基)
- [ ] 禁止使用彩色阴影或大面积阴影
- [ ] 禁止使用多种字体(只用 Inter)
- [ ] 禁止使用饱和度过高的颜色(除品牌紫色外)
- [ ] 禁止装饰性元素(渐变背景、blob、噪点纹理等)

更多提示词库:全部 UI 提示词 · Tailwind UI 提示词 · 暗色模式提示词

社区

评分与反馈

还没有人评分,来当第一个登录后评分

正在加载评论…

组件模板

组件预览

按钮

Linear 风格的渐变按钮

真实前端完成度

暗色、状态、动效与可访问性覆盖

这层检查这个风格是否已经具备真实网站常见的主题、状态反馈、键盘可访问性和性能约束。

总体覆盖

73%

手工校准

暗色模式

70%

部分

组件状态

85%

部分

动效规则

70%

部分

可访问性

70%

部分

性能代价

70%

部分

关键状态覆盖

light / dark
悬停键盘焦点禁用加载中空状态错误成功

按钮

默认 / 悬停 / 键盘焦点 / 按下 / 禁用

输入框

默认 / 悬停 / 键盘焦点 / 禁用 / 错误

卡片

默认 / 悬停 / 键盘焦点 / 加载中 / 骨架屏

表单

默认 / 键盘焦点 / 禁用 / 加载中 / 错误

落地注意事项

  • 暗色模式需要使用语义 tokens,不要直接把浅色主题反相。
  • 组件至少要覆盖悬停、键盘焦点、禁用、加载、空状态、错误和成功反馈。
  • 可访问性需要检查对比度、键盘导航、44px 点击区域和 reduced-motion。
  • 性能上避免动画改变布局;重 blur/shadow 的风格要控制层数和滚动区域。

常见问题

关于Linear 风格的常见问题

什么是Linear 风格风格?
受 Linear 应用启发的极简暗色设计风格。精确的排版、克制的动效、开发者审美的极致表达。深色背景配合微妙的渐变和精细的边框。 它的设计理念:Linear Style 源自备受开发者推崇的项目管理工具 Linear。其设计理念是"每一个像素都有目的"。 核心理念: - 深色优先:几乎纯黑的背景(#0a0a0b),让内容成为唯一焦点 - 精确排版:Inter 字体,letter-spacing 微调,恰到好处的行高 - 克制渐变:紫色渐变仅用于主要 CTA 和品牌元素 - 微妙边框:1px 的半透明白色边框划分层级 - 无多余装饰:没有阴影、没有圆角过大的元素、没有花哨的效果 设计原则: - 视觉一致性:所有组件必须遵循统一的视觉语言,从色彩到字体到间距保持谐调 - 层次分明:通过颜色深浅、字号大小、留白空间建立清晰的信息层级 - 交互反馈:每个可交互元素都必须有明确的 hover、active、focus 状态反馈 - 响应式适配:设计必须在移动端、平板、桌面端上保持一致的体验 - 无障碍性:确保色彩对比度符合 WCAG 2.
Linear 风格风格常用什么配色?
Linear 风格 的主色是 #5e6ad2,辅色是 #0a0a0b,强调色包括 #f2c94c、#27ae60、#eb5757、#2d9cdb。每个色值都可以在本页色板中复制。
怎样把Linear 风格风格做对?
关键做法:背景使用近黑 bg-[#0a0a0b] 或 bg-zinc-950. 文字使用 text-white 和 text-zinc-400 双层级. 边框使用 border border-white/10.
Linear 风格风格最常见的错误是什么?
应避免:禁止使用白色/浅色背景(暗色是根基). 禁止使用彩色阴影或大面积阴影. 禁止使用多种字体(只用 Inter).
如何让 AI 生成Linear 风格风格的界面?
复制本页提供的 AI 提示词(含设计 tokens 与组件规则),粘贴到 ChatGPT、Claude、Claude Code 或 Codex。提示词中应包含关键词:Linear、极简、暗色、开发者。
全局样式

全局 CSS

css
/* Linear Style Global Styles */
@layer base {
  body {
    @apply bg-[#0a0a0b] text-white antialiased;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
  }
}

@layer utilities {
  .linear-border {
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .linear-surface {
    background: rgba(255, 255, 255, 0.03);
  }

  .linear-surface-hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .linear-gradient {
    background: linear-gradient(to right, #5e6ad2, #8b5cf6);
  }
}
/* Linear Style Design Tokens */
:root {
  --linear-style-primary: #5e6ad2;
  --linear-style-secondary: #0a0a0b;
  --linear-style-accent: #f2c94c;
  --linear-style-glow: rgba(94, 106, 210, 0.3);
}

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

@keyframes linear-style-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.linear-style-card {
  position: relative;
  overflow: hidden;
}

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

.linear-style-card:hover::before {
  opacity: 1;
}

.linear-style-frosted {
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  background: rgba(94, 106, 210, 0.08);
}

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

.linear-style-animate-in {
  animation: linear-style-fade-in 0.5s ease-out both;
}

IDE 集成

IDE 配置导出

下载 AI 编码助手的配置文件,使其按照此风格生成代码。

风格包

导出风格包

获取完整的可机器读取风格资源,包括 Design Tokens、Tailwind 预设、CSS 变量和 shadcn/ui 主题。

Metadata

Style metadata including version information

Design Tokens

Figma / Style Dictionary / Tokens Studio 兼容

Tailwind Preset

Tailwind CSS 主题预设,可直接在配置中引用

Global CSS

包含 CSS 变量和基础样式

shadcn Theme

shadcn/ui 主题配置

CSS Variables

纯 CSS 变量,适用于任何项目

SKILL.md

可加载到 Cursor / Claude Code / VS Code 的技能包

设计哲学

Linear Style 源自备受开发者推崇的项目管理工具 Linear。其设计理念是"每一个像素都有目的"。

无障碍

无障碍评分

基于颜色对比度和排版可读性的 WCAG 2.1 合规分析。

82

综合评分

等级: B - 良好

对比度

分数: 88/100平均比率: 12.25:1
AA 通过AAA 未通过
场景颜色比率AAAAA
Text on background
/#ffffff / #0a0a0b
19.79:1
Text on accent 1
/#ffffff / #5e6ad2
4.7:1

可读性

分数

67/100

字号

text-sm

字重

font-sans font-semibold tracking-tight

行高

default

评分基于 WCAG 2.1 标准。AA 级要求普通文本对比度 4.5:1、大文本 3:1;AAA 级要求普通文本 7:1、大文本 4.5:1。

设计配方

使用 Linear 风格 的推荐组合

这些精选配方将此风格与布局和动画组合,针对特定场景优化。