跳到正文
Skillpedia
界面(UI/UX)48k · #4396

flat-design

它能做什么

本指南讲解如何用“扁平化设计”(Flat Design)风格制作网站和应用界面。这种风格注重简洁的视觉元素、醒目的颜色,并且没有任何纵深感。

适用场景

  • ✓当你想要简洁、现代的外观时。
  • ✓当界面需要清晰、直接的表达时。
  • ✓当你想避免阴影、渐变或 3D 效果时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/design-it/flat-design/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/design-it/flat-design/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“做一个扁平化风格的按钮,不要阴影,颜色要鲜艳。”

每周 5 个新技能,1 分钟读完。

工作原理

扁平化设计使用基础的几何图形和纯色。实现时要避免阴影、渐变和圆角,注重锐利的边缘和强烈的对比。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Flat Design

"Digital surfaces should look digital. Embrace the 2D plane."

When to Use

Use this sub-style when the user's request matches the aesthetic described above. This is a child reference of the design-it skill and is not meant to be triggered directly.

Core Principles

  1. Zero Depth: Absolutely no drop shadows, bevels, gradients, or 3D effects. Everything sits on the same z-axis.
  2. Sharp & Simple Geometries: Perfect circles, sharp rectangles. No complex organic shapes.
  3. High Contrast Solid Colors: Rely on stark contrast between solid blocks of color to delineate space.

Visual DNA

  • Colors: Pairs well with Industrial Chic or Modern Editorial. Avoid gradients entirely.
  • Typography: Strong, highly legible sans-serifs (e.g., Roboto, Open Sans). Keep it medium to bold.
  • Icons: Solid, monochromatic, glyph-style icons without intricate details.

Web Implementation

  • Rely entirely on background colors and borders for structure.
  • CSS Example:
.flat-card {
  background-color: var(--secondary-base);
  border: 2px solid var(--primary-text);
  border-radius: 0; /* Sharp corners preferred */
  padding: 32px;
  /* NO box-shadow */
}
.flat-btn {
  background-color: var(--cta-highlight);
  color: #fff;
  border: none;
  padding: 16px 32px;
  font-weight: 700;
  text-transform: uppercase;
  transition: opacity 0.2s;
}
.flat-btn:hover {
  opacity: 0.8; /* Only change opacity or solid color on hover, no lifting */
}

App Implementation

SwiftUI

struct FlatCard: View {
    var body: some View {
        VStack(alignment: .leading, spacing: 16) {
            Text("Card Title")
                .font(.system(size: 18, weight: .bold))
            
            Text("Content without any depth effects.")
                .font(.system(size: 15))
                .foregroundColor(.secondary)
            
            Button(action: {}) {
                Text("ACTION")
                    .font(.system(size: 14, weight: .bold))
                    .foregroundColor(.white)
                    .padding(.horizontal, 24)
                    .padding(.vertical, 12)
                    .background(Color.blue)
                    // No cornerRadius — sharp edges
            }
        }
        .padding(24)
        .background(Color(.secondarySystemBackground))
        // NO .shadow() — ever
        // NO .cornerRadius() — sharp rectangles
        .overlay(
            Rectangle().stroke(Color.primary.opacity(0.2), lineWidth: 1)
        )
    }
}
  • Never use .shadow() or .cornerRadius(). Elements are flat rectangles.
  • Use .overlay(Rectangle().stroke(...)) for visible borders instead of shadows to delineate space.
  • Hover/tap states should only change opacity or swap a solid background color.

Flutter

class FlatCard extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.all(24),
      decoration: BoxDecoration(
        color: Colors.grey[100],
        border: Border.all(color: Colors.black26, width: 1),
        // borderRadius: NONE — sharp corners
        // boxShadow: NONE — zero depth
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          const Text('Card Title',
            style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)),
          const SizedBox(height: 16),
          const Text('Content without any depth effects.',
            style: TextStyle(fontSize: 15, color: Colors.black54)),
          const SizedBox(height: 16),
          ElevatedButton(
            onPressed: () {},
            style: ElevatedButton.styleFrom(
              elevation: 0,           // Critical: no shadow
              backgroundColor: Colors.blue,
              foregroundColor: Colors.white,
              shape: const RoundedRectangleBorder(
                borderRadius: BorderRadius.zero, // Sharp corners
              ),
              padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
            ),
            child: const Text('ACTION',
              style: TextStyle(fontWeight: FontWeight.bold, letterSpacing: 1)),
          ),
        ],
      ),
    );
  }
}
  • Override ThemeData globally to kill all elevation:
    ThemeData(
      cardTheme: const CardTheme(elevation: 0, shape: RoundedRectangleBorder()),
      appBarTheme: const AppBarTheme(elevation: 0),
    

…

常见问题

“Zero Depth”是什么意思?

意思是所有元素看起来都位于同一个平面上,没有阴影、倒角等能营造出纵深错觉的效果。

应该使用什么样的颜色?

使用纯色,并让颜色之间有良好的对比,以此区分不同元素,而不是使用渐变或柔和的过渡色调。

可以使用圆角吗?

扁平化设计更偏好锐利、笔直的直角。如果确实需要圆角,就把圆角半径设得很小,或者干脆不用。

详情

作者的原始描述

Web and App implementation guide for the Flat Design style. Trigger when the user wants no shadows, simple shapes, and bold colors.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4396
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能