Ant Design
lint passAnt Design is Ant Group's enterprise design system, widely used for admin and data-heavy web apps. Its tokens are generated programmatically from seed tokens via the antd theme algorithm; the values here are the documented v5 default (light) seed/map tokens. Ant favours a vivid brand blue, crisp neutral grays, 6px rounding, and a dense 14px-based type scale.
best for: Data-dense admin and back-office UIs · Enterprise dashboards and CRUD apps · Teams matching an Ant Design product feel
## get the file
Actions## preview as an app
These screens are rendered live from the tokens below — an approximation of the system's language, not its official components.
## colors
- primary#1677FF
- on-primary#FFFFFF
- primary-hover#4096FF
- link#1677FF
- surface#FFFFFF
- on-surface#1F1F1F
- on-surface-variant#595959
- surface-variant#F5F5F5
- fill#F0F0F0
- border#D9D9D9
- success#52C41A
- warning#FAAD14
- error#FF4D4F
## typography
- displayInter · 2.375rem · 600 · lh 1.23
- headingInter · 1.5rem · 600 · lh 1.35
- titleInter · 1.25rem · 600 · lh 1.4
- body-lgInter · 1rem · 400 · lh 1.5
- bodyInter · 0.875rem · 400 · lh 1.57
- labelInter · 0.75rem · 500 · lh 1.4
- codeJetBrains Mono · 0.875rem · 400 · lh 1.5
## spacing
- xxs4px
- xs8px
- sm12px
- md16px
- lg24px
- xl32px
- 2xl48px
## shapes
- sm2px
- md6px
- lg8px
- full9999px
## component tokens
| component | property | value |
|---|---|---|
| button-primary | backgroundColor | {colors.primary} |
| textColor | {colors.on-primary} | |
| rounded | {rounded.md} | |
| padding | 8px 16px | |
| button-primary-hover | backgroundColor | {colors.primary-hover} |
| textColor | {colors.on-primary} | |
| button-default | backgroundColor | {colors.surface} |
| textColor | {colors.on-surface} | |
| rounded | {rounded.md} | |
| padding | 8px 16px | |
| card | backgroundColor | {colors.surface} |
| textColor | {colors.on-surface} | |
| rounded | {rounded.lg} | |
| padding | {spacing.md} | |
| layout | backgroundColor | {colors.surface-variant} |
| textColor | {colors.on-surface} | |
| padding | {spacing.md} | |
| tag | backgroundColor | {colors.fill} |
| textColor | {colors.on-surface} | |
| rounded | {rounded.sm} | |
| padding | 0px 8px | |
| input | backgroundColor | {colors.surface} |
| textColor | {colors.on-surface} | |
| rounded | {rounded.md} | |
| padding | 5px 12px | |
| link | textColor | {colors.link} |
| caption | textColor | {colors.on-surface-variant} |
| typography | {typography.body} | |
| divider | backgroundColor | {colors.border} |
| height | 1px | |
| badge-success | backgroundColor | {colors.success} |
| textColor | {colors.on-surface} | |
| rounded | {rounded.full} | |
| padding | 2px 8px | |
| badge-warning | backgroundColor | {colors.warning} |
| textColor | {colors.on-surface} | |
| rounded | {rounded.full} | |
| padding | 2px 8px | |
| badge-error | backgroundColor | {colors.error} |
| textColor | {colors.on-primary} | |
| rounded | {rounded.full} | |
| padding | 2px 8px |
## raw file
DESIGN.md — view raw file
---
version: alpha
name: Ant Design
description: Ant Group's enterprise UI system — a vivid brand blue, crisp neutrals, and dense data-rich layouts.
colors:
primary: "#1677FF"
on-primary: "#FFFFFF"
primary-hover: "#4096FF"
link: "#1677FF"
surface: "#FFFFFF"
on-surface: "#1F1F1F"
on-surface-variant: "#595959"
surface-variant: "#F5F5F5"
fill: "#F0F0F0"
border: "#D9D9D9"
success: "#52C41A"
warning: "#FAAD14"
error: "#FF4D4F"
typography:
display:
fontFamily: Inter
fontSize: 2.375rem
fontWeight: 600
lineHeight: 1.23
heading:
fontFamily: Inter
fontSize: 1.5rem
fontWeight: 600
lineHeight: 1.35
title:
fontFamily: Inter
fontSize: 1.25rem
fontWeight: 600
lineHeight: 1.4
body-lg:
fontFamily: Inter
fontSize: 1rem
fontWeight: 400
lineHeight: 1.5
body:
fontFamily: Inter
fontSize: 0.875rem
fontWeight: 400
lineHeight: 1.57
label:
fontFamily: Inter
fontSize: 0.75rem
fontWeight: 500
lineHeight: 1.4
code:
fontFamily: JetBrains Mono
fontSize: 0.875rem
fontWeight: 400
lineHeight: 1.5
rounded:
sm: 2px
md: 6px
lg: 8px
full: 9999px
spacing:
xxs: 4px
xs: 8px
sm: 12px
md: 16px
lg: 24px
xl: 32px
2xl: 48px
components:
button-primary:
backgroundColor: "{colors.primary}"
textColor: "{colors.on-primary}"
rounded: "{rounded.md}"
padding: 8px 16px
button-primary-hover:
backgroundColor: "{colors.primary-hover}"
textColor: "{colors.on-primary}"
button-default:
backgroundColor: "{colors.surface}"
textColor: "{colors.on-surface}"
rounded: "{rounded.md}"
padding: 8px 16px
card:
backgroundColor: "{colors.surface}"
textColor: "{colors.on-surface}"
rounded: "{rounded.lg}"
padding: "{spacing.md}"
layout:
backgroundColor: "{colors.surface-variant}"
textColor: "{colors.on-surface}"
padding: "{spacing.md}"
tag:
backgroundColor: "{colors.fill}"
textColor: "{colors.on-surface}"
rounded: "{rounded.sm}"
padding: 0px 8px
input:
backgroundColor: "{colors.surface}"
textColor: "{colors.on-surface}"
rounded: "{rounded.md}"
padding: 5px 12px
link:
textColor: "{colors.link}"
caption:
textColor: "{colors.on-surface-variant}"
typography: "{typography.body}"
divider:
backgroundColor: "{colors.border}"
height: 1px
badge-success:
backgroundColor: "{colors.success}"
textColor: "{colors.on-surface}"
rounded: "{rounded.full}"
padding: 2px 8px
badge-warning:
backgroundColor: "{colors.warning}"
textColor: "{colors.on-surface}"
rounded: "{rounded.full}"
padding: 2px 8px
badge-error:
backgroundColor: "{colors.error}"
textColor: "{colors.on-primary}"
rounded: "{rounded.full}"
padding: 2px 8px
---
## Overview
Ant Design is Ant Group's enterprise UI system for data-heavy web applications.
Its character is crisp and efficient: a vivid brand blue (`{colors.primary}`) on
clean neutral grays, moderate 6px rounding, and a dense 14px-based type scale
tuned for tables, forms, and admin consoles.
Reach for Ant Design for back-office tools, CRUD-heavy dashboards, and
enterprise apps that need a large, consistent component vocabulary.
## Colors
- **primary (`#1677FF`) / on-primary (`#FFFFFF`)** — the vivid brand blue for
primary actions and selection; **primary-hover (`#4096FF`)** for hover.
- **link (`#1677FF`)** — inline links.
- **surface (`#FFFFFF`) / surface-variant (`#F5F5F5`)** — content background and
the page/layout backdrop; **fill (`#F0F0F0`)** for tags and quiet fills.
- **on-surface (`#1F1F1F`) / on-surface-variant (`#595959`)** — primary and
secondary text.
- **border (`#D9D9D9`)** — the default control and divider line.
- **success (`#52C41A`) / warning (`#FAAD14`) / error (`#FF4D4F`)** — status
colours; success/warning read best as fills with dark text, error as a fill.
Note: Ant's palette is intentionally vivid — some brand/status pairings sit near
the WCAG AA threshold; pair them with dark text (or use icons/large text) as here.
## Typography
Ant Design uses the OS system font stack (no brand font); this file uses the open
**Inter** as a neutral stand-in, with **JetBrains Mono** for code. The scale is
dense: body sits at `{typography.body}` (0.875rem / 14px).
- **display / heading / title** — Inter Semibold for the title hierarchy.
- **body-lg / body** — Inter Regular for reading and dense UI text.
- **label** — Inter Medium for field labels and captions.
- **code** — `{typography.code}` for identifiers and snippets.
## Spacing & Layout
Spacing follows a 8px rhythm with a 4px nudge: `{spacing.xxs}` (4px) through
`{spacing.md}` (16px) to `{spacing.2xl}` (48px). Use `{spacing.xs}`–`{spacing.sm}`
for control padding and table rows, `{spacing.lg}`–`{spacing.xl}` for section
structure. Rounding is moderate — `{rounded.md}` (6px) for most controls.
## Components
- **button-primary** — `{colors.primary}` with `{colors.on-primary}`, `{rounded.md}`
corners; hover shifts to `{colors.primary-hover}`.
- **button-default** — `{colors.surface}` with a `{colors.border}` outline and
`{colors.on-surface}` label.
- **card / layout** — `{colors.surface}` cards on a `{colors.surface-variant}`
page.
- **tag** — `{colors.fill}` chip with `{colors.on-surface}` text.
- **input** — `{colors.surface}` field, `{colors.border}` outline, `{rounded.md}`
corners; focus uses a `{colors.primary}` ring.
- **link** — `{colors.link}` text.
- **caption** — `{colors.on-surface-variant}` secondary text.
- **divider** — a 1px `{colors.border}` hairline.
- **badge-success / badge-warning / badge-error** — status pills in
`{colors.success}`, `{colors.warning}`, and `{colors.error}`.
## Motion
Ant motion is brisk and functional: ~100–300ms with ease on hover, focus, and
expand/collapse. Honour `prefers-reduced-motion`.
## Do's and Don'ts
- **Do** keep `{colors.primary}` for interaction; **don't** use it as a large
decorative fill.
- **Do** pair vivid status colours with dark text or icons; **don't** set them as
small text on white below AA.
- **Do** keep layouts dense on the 8px grid; **don't** invent off-grid spacing.
- **Do** use `{colors.fill}` for quiet tags and `{colors.border}` hairlines;
**don't** stack heavy shadows.
- **Do** keep body copy at `{typography.body}` for density; **don't** enlarge it
arbitrarily.
- **Do** render code in `{typography.code}`; **don't** mix families within a run.
## Agent Prompt Guide
When generating UI in the Ant Design style:
1. Reference tokens by name (`{colors.primary}`, `{spacing.md}`,
`{typography.body}`) — never hardcode raw values.
2. Validate contrast: Ant's palette is vivid, so pair `{colors.success}`,
`{colors.warning}`, and `{colors.error}` with dark text or icons.
3. Default composition: `{colors.surface-variant}` page → `{colors.surface}`
cards and tables → one `button-primary` per view.
4. Keep density high on the 8px spacing grid with `{rounded.md}` corners.
5. Use an open sans-serif (Ant ships no brand font) and never proprietary font
binaries.
6. If a needed token is missing, propose it in a PR — do not invent values.
## use it with your agent
target: CLAUDE.md · full guide →
# Fetch the design system file curl -fsSL https://api.agent-ds.oday-bakkour.com/v1/systems/ant-design/design.md -o DESIGN.md # CLAUDE.md — add: ## Design system Read ./DESIGN.md before writing or changing any UI. Use its tokens by name; never invent colors, radii, fonts, or spacing.
target: .cursor/rules/design-system.mdc · full guide →
# Fetch the design system file curl -fsSL https://api.agent-ds.oday-bakkour.com/v1/systems/ant-design/design.md -o DESIGN.md # .cursor/rules/design-system.mdc — add: --- description: Design system rules for all UI work globs: ["**/*.tsx", "**/*.css"] --- Read DESIGN.md at the repo root before generating UI. Reference its tokens by name; never invent values.
target: .kiro/steering/design-system.md · full guide →
# Fetch into Kiro's steering directory curl -fsSL https://api.agent-ds.oday-bakkour.com/v1/systems/ant-design/design.md \ -o .kiro/steering/design-system.md
target: global_rules.md · full guide →
# Fetch the design system file curl -fsSL https://api.agent-ds.oday-bakkour.com/v1/systems/ant-design/design.md -o DESIGN.md # global_rules.md — add: Before any UI change, read DESIGN.md at the repo root and use its design tokens exactly. Do not invent colors, type, spacing, or radii.
target: AGENTS.md · full guide →
# Fetch the design system file curl -fsSL https://api.agent-ds.oday-bakkour.com/v1/systems/ant-design/design.md -o DESIGN.md # AGENTS.md — add: ## UI & design system All UI follows ./DESIGN.md. Reference tokens by name; never invent colors, typography, spacing, or radii.
target: .github/copilot-instructions.md · full guide →
# Fetch the design system file curl -fsSL https://api.agent-ds.oday-bakkour.com/v1/systems/ant-design/design.md -o DESIGN.md # .github/copilot-instructions.md — add: When generating or editing UI, follow the design tokens and rules in DESIGN.md at the repository root. Never invent design values.
target: AGENTS.md · full guide →
# Fetch the design system file curl -fsSL https://api.agent-ds.oday-bakkour.com/v1/systems/ant-design/design.md -o DESIGN.md # AGENTS.md — add (OpenCode reads it at the repo root): ## UI & design system All UI follows ./DESIGN.md. Reference tokens by name; never invent colors, typography, spacing, or radii.
target: AGENTS.md · full guide →
# Fetch the design system file curl -fsSL https://api.agent-ds.oday-bakkour.com/v1/systems/ant-design/design.md -o DESIGN.md # AGENTS.md — add (pi loads it at startup; run /reload after editing): ## UI & design system All UI follows ./DESIGN.md. Reference tokens by name; never invent colors, typography, spacing, or radii.
## provenance
fetched 73 times · downloaded 0 times