跳至主要内容
Stripe Docs

Stripe Docs DESIGN.md 设计系统与风格规范

Developer ToolsPro 专属v1.0.0 (最新)
docs.stripe.com•关联于 2026年12月1日 04:00•审核 Bestony

A documentation system that loads no webfonts at all: system sans for interface, Menlo for the 182 code spans, one indigo for links, and elevation built from Stripe's signature layered zero-blur ring shadows over a 14px white dot grid.

Pro 专属网站

当前可免费阅读 Stripe Docs 的完整设计叙述与最多 8 色主色板。升级 Pro 即可获取全部 146 个设计 Token、完整 DESIGN.md 源码下载及 1 个历史版本。

显示 8 / 24 个颜色
深色 (2%)
Aa 示例文字#1A2C44
ink
rgb(26, 44, 68)
浅色 (72%)
Aa 示例文字#D4DEE9
ring
rgb(212, 222, 233)
深色 (41%)
Aa 示例文字#A3ACB9
outline
rgb(163, 172, 185)
深色 (17%)
Aa 示例文字#5469D4
primary
rgb(84, 105, 212)
浅色 (100%)
Aa 示例文字#FFFFFF
surface
rgb(255, 255, 255)
深色 (1%)
Aa 示例文字#1A1F36
ink-navy
rgb(26, 31, 54)
浅色 (57%)
Aa 示例文字#7FD3ED
code-cyan
rgb(127, 211, 237)
深色 (6%)
Aa 示例文字#3C4257
code-text
rgb(60, 66, 87)
获取完整色板、CSS 变量与 DESIGN.md 源码

升级 DesignMD Pro,复制全部颜色的 :root CSS 变量、查看组件配色引用并下载完整源文件。

设计规范

Overview

Stripe's documentation is the reference implementation of a docs site that treats code as the primary content and chrome as the secondary. The page opens with a hero, three columns of product links and a "Try it out" panel containing a live stripe payment_intents create command beside its JSON response — and the JSON panel is the largest, darkest, most visually dominant object on the screen.

The system's most unusual property is that it loads no webfonts whatsoever. loadedFontFaces came back empty. The interface is set in the system sans stack (-apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial) and every code sample in Menlo — which, at 182 measured uses against 105 for the UI sans, is the most-repeated family on the page. For a documentation site this is the correct call: the text is code, the code must render in a monospace the reader already trusts, and shipping a webfont to do it would be pure cost.

The visual idea is one indigo, a long navy-to-grey text ramp, and a dot grid that fades from warm to cool across the hero. Stripe's indigo #5469d4 appears 49 times and is used for exactly one thing: links. Everything structural is navy #1a2b44 fading through #414552, #50617a and #697386 to #a3acb9.

Colors

  • Primary / Stripe indigo (#5469d4): Links, and only links — 49 measured uses, plus one button fill. It is never used for a heading, a border or a surface. This restraint is the single clearest rule in the system.
  • Ink (#1a2c44): Headings, nav labels and the strongest text. A deep navy, not a neutral black — the whole palette is cool. The inner pages use a second, slightly cooler navy #1a1f36 alongside it (37 uses on /payments, 175 on /changelog), close enough to pass for the same colour at a glance and one step deeper in practice. Two navys this similar is a genuine trap.
  • Text ramp — five steps, and it carries all the hierarchy: #414552 (body copy, 19 uses) → #50617a (secondary copy, 15) → #697386 (muted, 7) → #a3acb9 (faint, and also the default border colour, 6). Nothing in the system is coloured; hierarchy is entirely this ramp plus size and weight. The inner pages add a sixth step, #4e566d, sitting between #414552 and #50617a and used heavily for secondary copy on /changelog (347 uses) — so the ramp is really six values deep on the pages that carry the most prose.
  • Changelog accent (#b13600): A dark rust-orange that appears only on /changelog, 50 times, and is the single most-saturated non-indigo colour in the whole system. Like #1a1f36 and #4e566d it is not present in any shipped stylesheet — the three are applied inline or by a runtime style injection, which means a copy of the CSS alone will not reproduce them.
  • Surfaces: #ffffff (cards and the page), #f7fafc (the subdued ground, 8 uses), #f4f7fa (a sunken variant, 4) and #d4dee9 (the fill, 8). Four steps of near-white, cool-tinted, and the differences between them are deliberately tiny.
  • Code panel (#273951, #2a2f45, #3c4257): Three dark navies. The response panel is #273951, the command strip above it is darker, and the code's own text sits at #3c4257 on light grounds. This is the only dark surface in the system and it is where the eye goes first.
  • Syntax colours — three, and only three: #85d996 green (51 uses — object keys and strings), #e4ab80 orange (5) and #7fd3ed cyan (1). A documentation syntax theme this restrained is rare; most use six or eight.
  • Borders: #a3acb9 (7), #c1c9d2 and #ecf1f6. Used sparingly, because most boundaries are drawn as ring shadows instead (see Elevation).

The hero's dot grid is white dots on a coloured base that is not in the stylesheet — the gradient beneath it is applied inline or as an image asset, so its exact stops cannot be cited from the CSS. What is visible in the render is a warm-to-cool sweep: orange-ish dots at the left edge cooling to blue at the right, with the 14px white dot matrix laid uniformly over the top.

Typography

Two families, both system, and the split is the whole idea. The UI is the system sans stack; every code sample is Menlo, Consolas, monospace. Menlo is used 182 times against the sans's 105 — on this page, monospace outranks sans-serif. Source Code Pro appears twice, presumably as an explicit override.

Because nothing is loaded, there is no FOUT, no font-display strategy and no webfont cost at all. The page is fully readable on the first paint.

Design system specification
RoleFaceSize / weight
Page h1 ("Documentation")system sans32px / 700
Column headingssystem sans20px / 600
Nav / labelssystem sans15–16px / 600
Bodysystem sans15–16px / 400
Code panelMenlo14px / 400
Inline codeMenlo12px / 400

Three details define the typographic voice:

  • The hero heading is the only 700 on the page. Everything else is 400 or 600. One bold line, then calm.
  • Body copy is 15–16px on a 1.5 line, and secondary copy drops to 15px in the mid-ramp grey. The docs never go below 12px except for inline code.
  • Code is set at 14px against a 16px body, so code is smaller than the prose around it. Most docs sites make code larger; Stripe makes it quieter and lets the dark panel do the emphasising instead.

Layout

A 1200px container (with a 1175px variant) and a 12px gutter, on a strict 4px spacing base: 12px is the single most-repeated measurement at 62 uses, followed by 8px (34), 4px (33) and 16px (26). The page is only 900px tall — the docs home is a landing page, not a document.

The structure is:

  1. Header — the Stripe wordmark with "DOCS" beside it, a centred search field with a / shortcut hint and an "Ask AI" button, then "Create account" and "Sign in" on the right.
  2. Primary nav — Get started, Payments, Revenue, Risk, Data, Money management, Stablecoins, Embedded finance, Developer resources, with "APIs & SDKs" and "Help" pushed right.
  3. Hero — "Documentation", one line of dek, a filled "Get started with Stripe" button and an "Explore all products" link, over the dot grid. A floating sign-in card and a "Test cards 4242 4242 4242 4242" chip sit to the right.
  4. Three columns — Payments, Revenue and Developers, each a heading and three or four indigo links.
  5. "Try it out" — a tab strip of eight tasks (Start a payment, Start a checkout session, Create a customer, Sell a product, Issue coupons, Get your balance, Manage taxes) beside a dark code panel showing the command and its JSON response.

There is no sidebar on this page — the docs proper have one, but the landing page is a single centred column. The three product columns are the only multi-column element, and they are separated by whitespace alone.

Elevation & Depth

Stripe's signature: elevation is a stack of zero-blur rings, not a soft shadow. The measured shadows are all multi-layer, and almost every layer is a 0 0 0 Npx spread with no blur at all:

  • Ring only — rgba(0,0,0,0) 0 0 0 0, rgba(0,0,0,0) 0 0 0 1px, rgba(0,0,0,0) 0 0 0 0, rgba(0,0,0,0) 0 0 0 0 — 32 uses. This is a 1px border drawn as a box-shadow, which is why the page has so few real border declarations. The three transparent layers are Tailwind's placeholder slots, kept so the ring can be swapped without rewriting the declaration.
  • Card — rgba(16, 17, 26, 0.16) 0 1px 1px 0, rgb(212, 222, 233) 0 0 0 1px — the grey ring plus a barely-there dark contact shadow.
  • Elevated — rgba(60, 66, 87, 0.08) 0 7px 14px 0, rgba(0, 0, 0, 0.12) 0 3px 6px 0 — the dropdown and popover shadow, in navy #3c4257 at 8% rather than black.
  • Inset hairline — rgb(227, 232, 238) 0 -1px 0 0 inset — a single inset top line, used to separate a header from its body without a border.
  • White glow — rgba(255, 255, 255, 0.75) 0 0 64px 64px — a very wide, very soft white bloom used to fade one section into the next.

Two things are worth copying. First, the ring shadows are navy-tinted, not black — rgba(60, 66, 87, …) rather than rgba(0, 0, 0, …), which keeps the elevation in the same cool key as the text. Second, a border and a shadow are the same tool here: swapping rgba(0,0,0,0) 0 0 0 1px for rgb(212,222,233) 0 0 0 1px is how a control goes from invisible to bounded.

Shapes

Small, consistent, and mostly 4px. The measured radii are 4px (22 uses), 8px (10), 6px (3), 14px (2), then 7px, 2px and one elliptical 100% / 85%.

  • 4px — the default: buttons, inputs, the code panel's inner elements.
  • 8px — the code panel and the larger cards.
  • 6px — mid-size controls. On /changelog this jumps to 90 uses, making it the second radius on that page.
  • 14px — the two largest containers, including the hero's floating sign-in card.
  • 12px — ten uses on /changelog, a step below 14px.
  • 100% / 85% — one element, an ellipse wider than it is tall. A pill that has been squashed, almost certainly a search field or a chip.
  • 9999px — the search field's full pill radius.

So the shape rule is: 4px by default, 8px for panels, 14px for the largest containers, and a full pill only on the search field. Nothing is dramatic, and the tight range is what makes a page this dense feel calm.

Motion & Micro-interaction

Fast, and built on one curve. The house transition is color 0.1s cubic-bezier(0, 0, 0.4, 1) — nine declarations. That curve decelerates hard at the end, so a 100ms colour change still reads as a deliberate fade rather than a snap.

The rest of the vocabulary:

  • color 0.24s ease — three uses, the slower link hover.
  • background-color, box-shadow 0.15s cubic-bezier(0, 0.09, 0.4, 1) — two uses, on controls whose ring shadow also changes.
  • transform 0.12s cubic-bezier(0, 0.09, 0.4, 1) — one use, a small nudge.
  • all 0.15s ease-in-out, box-shadow 0.15s ease, width 0.15s ease-in-out — one each, for the accordion, the focus ring and the search field's expansion.

There is one keyframe animation: a skeleton shimmer, linear-gradient(to right, #f7fafc 50%, #f0f3f7 80%, #f7fafc 100%) at background-size: 200% 100% on an ease-in-out loop — the standard loading placeholder, using the two subdued surface tones.

Nothing scrolls, nothing parallaxes, and the hero's dot grid is completely static.

Voice & Content Strategy

  • Tone of voice: Flat and instructional. The dek is one sentence — "Explore our guides and examples to integrate Stripe." — with no adjective and no exclamation. The page never sells; it routes.
  • The search field is the primary control, with its / keyboard shortcut printed inside it and an "Ask AI" button beside it. For a docs site this is the correct hierarchy: most visitors arrive with a question, not a browse.
  • Products are named as Stripe names them: Payments, Revenue, Risk, Data, Money management, Stablecoins, Embedded finance, Developer resources. The sub-links are verb phrases — "Accept payments online", "Sell subscriptions", "Set up the customer portal", "Build on Stripe with AI".
  • The code is the argument. "Try it out" shows a real command ($ stripe payment_intents create --amount 1099 --currency "usd") beside its real JSON response, with the test card 4242 4242 4242 4242 named in the hero. Nothing is described that can be shown.
  • Machine-readable docs are a first-class link. The footer carries a plain "Read llms.txt" link, and the docs are built with Markdoc — Stripe's own documentation toolchain — which is credited by name.
  • Support is tiered and specific: Contact Support (support.stripe.com), Discord (a developer chat invite), the changelog, and Contact Sales. Four distinct destinations rather than one form.
  • Authentication is framed as a benefit, not a wall: "Sign in or create an account to load your test API keys." The gate is stated as what it unlocks.
  • API versions are named after plants. The changelog's version rail reads Endive, Dahlia, Clover, Basil, Acacia — no numbers, no years, no semantic versioning in the navigation at all. The names are ordered newest-first and are the entire versioning vocabulary a reader sees.
  • The docs treat AI agents as a first-class audience. The sidebar carries "AI TOOLS" — Agent plugins, Model Context Protocol, Agent skills, Stripe Directory — as a peer of Payments and Security, and the header offers "Ask AI" beside search. The machine-readable llms.txt is linked from the footer as plain text, not buried.
  • The sidebar is the real navigation. Ten top-level groups (Overview, Versioning, Essentials, Tools, Features, AI Tools, Extend Stripe, Security and Privacy, Partners) with sentence-case titles, and the changelog lives inside Versioning rather than in a footer.
  • Capitalization: Sentence case throughout, with Title Case only for proper nouns ("Stripe", "Markdoc", "Ask AI"). Button labels are sentence case ("Get started with Stripe", "Explore all products").

Components

  • header — White, full width, with the wordmark and "DOCS" lockup left, a centred search field, and "Create account" / "Sign in" right. Bounded below by an inset hairline rather than a border.
  • search-field — A full-pill field with a magnifier, a / shortcut hint inside it, and an "Ask AI" button immediately beside it. The only pill on the page.
  • nav-link — 15px in ink, with chevrons on the items that have dropdowns ("APIs & SDKs", "Help").
  • display-heading — "Documentation" at 32px/700, the only bold weight on the page, set over the dot grid.
  • link — #5469d4 at 15–16px, the default inline and standalone link. This is the only thing the indigo is used for.
  • button-primary — "Get started with Stripe": indigo fill, white 16px/600 label, 4px radius, 8px 12px padding, with a trailing chevron.
  • button-quiet — "Explore all products": no fill, just an underlined ink link at the same metrics.
  • link-list — The three product columns: a 20px/600 heading over three or four indigo links, separated from the next column by whitespace alone.
  • card — White, 8px radius, bounded by the grey ring shadow (rgb(212,222,233) 0 0 0 1px) plus the rgba(16,17,26,0.16) 0 1px 1px contact shadow.
  • dot-grid — The hero's background: radial-gradient(rgba(0,0,0,0) 1.5px, #fff 1px) tiled at 14px 14px across the full viewport height, laid over a warm-to-cool coloured base applied inline. White dots, 1px, on a 14px pitch.
  • code-panel — #273951, 8px radius, 16px padding, Menlo 14px, holding the JSON response. The command line above it sits on a darker #2a2f45 strip with a $ prompt. This is the darkest and visually heaviest object on the page.
  • code-green / code-orange / code-cyan — The three syntax colours, at 51, 5 and 1 uses. Green carries object keys and string values; orange and cyan are occasional accents.
  • dashed-connector — Flow-diagram rules drawn as linear-gradient(to top, #c1c9d2 0%, #c1c9d2 20%, transparent 20%) tiled at 2px 10px — a 2px dash on a 10px pitch, made from a gradient rather than a border style.
  • inset-hairline — rgb(227,232,238) 0 -1px 0 0 inset, the single-line separator between a panel's header and its body.
  • border-strong — A real 1px solid #a3acb9 border, used where a ring shadow would be too subtle: inputs, selects and table cells. Seven uses.
  • fill — #d4dee9 at 4px, the page's one step of genuine tint. Used for disabled controls, progress tracks and the shaded half of a split row.
  • inline-code — #3c4257 in Menlo at 12px, set inline in prose rather than in a panel. The light-ground counterpart to the code panel.
  • meta-quiet / heading-navy — The inner pages' two extra ramp values: #4e566d for secondary copy and #1a1f36 for headings, both one step off their marketing-page counterparts.
  • changelog-label — #b13600 at 16px/600, the changelog's accent. Used 50 times on that one page and nowhere else in the system.
  • skeleton — The loading shimmer: #f7fafc → #f0f3f7 → #f7fafc at 200% width on an ease-in-out loop.

Do's and Don'ts

  • Do use the indigo for links and nothing else. #5469d4 is 49 link uses and one button; it never touches a heading, a border or a surface. That restraint is what makes the colour mean something.
  • Do carry hierarchy in the five-step grey ramp — #414552, #50617a, #697386, #a3acb9 — rather than in colour. Nothing on the page is decorated.
  • Do ship no webfonts. The system sans for UI and Menlo for code, with loadedFontFaces empty. For a docs site the monospace is the brand.
  • Do set code smaller than the prose around it. Menlo at 14px against a 16px body, and let the dark panel do the emphasising.
  • Do draw borders as zero-blur ring shadows. rgba(0,0,0,0) 0 0 0 1px is a free slot; swapping in rgb(212,222,233) bounds the element without touching the layout.
  • Do tint the elevation navy, not black. rgba(60, 66, 87, 0.08) 0 7px 14px keeps the shadow in the same cool key as #1a2c44 text.
  • Do keep the radius tight — 4px by default, 8px for panels, 14px for the largest containers, and a full pill only on the search field.
  • Do hold the house curve at cubic-bezier(0, 0, 0.4, 1) and keep it fast: 100ms for colour, 150ms for controls, 240ms for the slow link hover.
  • Do tile the dot grid at 14px with 1px dots. radial-gradient(rgba(0,0,0,0) 1.5px, #fff 1px) at background-size: 14px 14px is the whole effect, and it costs one declaration.
  • Do draw dashed connectors as gradients. #c1c9d2 0%, #c1c9d2 20%, transparent 20% at 2px 10px gives a 2px dash on a 10px pitch with no border-style hackery.
  • Do link the machine-readable docs. A plain "Read llms.txt" in the footer, and credit the toolchain (Markdoc) by name.
  • Don't reach for a second accent colour. There is one indigo and three syntax colours, and the syntax colours never appear outside the code panel.
  • Don't ship a webfont for the UI. The system stack renders identically to what Stripe ships, at zero network cost.
  • Don't make the code bigger than the body copy. 14px Menlo under 16px sans is deliberate; enlarging it breaks the hierarchy the dark panel already establishes.
  • Don't confuse the three dark navies. #273951 is the response panel, #2a2f45 the command strip above it, #3c4257 the elevated shadow's tint. They are not interchangeable.
  • Don't use black for text or shadows. Ink is #1a2c44 and the shadow tint is #3c4257; #000 appears only inside the transparent placeholder layers of the ring shadows.
  • Don't assume the hero's coloured base is in the stylesheet. The dot overlay is, but the warm-to-cool gradient beneath it is applied inline or as an image asset — inspect the rendered element, not the CSS, if you need its stops.
  • Don't trust the shipped CSS as the full palette. #1a1f36, #4e566d and #b13600 are all heavily rendered and appear in no stylesheet; they arrive inline or at runtime. Measure the rendered page, not just the CSS.
  • Don't confuse the two navys. #1a2c44 is the marketing-page ink and #1a1f36 the inner-page heading colour; they differ by a single hex digit in the blue channel and read identically at a glance.

如何在 AI agent 里使用 Stripe Docs 的 DESIGN.md

  1. 获取 Stripe Docs 的 DESIGN.md

    请求 https://www.designmdpro.app/websites/stripe-docs.md,或通过 DesignMD Pro MCP 服务器调用 get_design_md 工具(slug 为 "stripe-docs"),即可获取公开版本;完整 tokens 需要 Pro。

  2. 保存为项目根目录下的 DESIGN.md

    把文件放在 AGENTS.md 或 CLAUDE.md 旁边,Claude Code、Cursor、Codex 等编码 agent 就能读到它。

  3. 让 agent 按它来写

    例如:“按照 DESIGN.md 里的 Stripe Docs 设计系统实现设置页,使用其中的颜色、字体和间距 tokens。”

Stripe Docs 风格 AI Prompt

参照 Stripe Docs(docs.stripe.com)的 DESIGN.md 设计系统,用它的视觉风格构建一个响应式落地页。

## 配色
- ink: #1A2C44
- ring: #D4DEE9
- outline: #A3ACB9
- primary: #5469D4
- surface: #FFFFFF
- ink-navy: #1A1F36
- code-cyan: #7FD3ED
- code-text: #3C4257

## 字体
- nav: "-apple-system", 15px, weight 400, line-height 1.33
- code: "Menlo", 14px, weight 400, line-height 1.6

## 圆角
- lg: 8px
- md: 6px
- sm: 4px

## 规则
- 背景、文字、边框和强调色只使用上面列出的颜色,不要自创新颜色。
- 所有文字都使用上面的字体样式,并保持它们的字号与字重层级。
- 圆角和间距取自上面的尺度,让各组件保持一致。

完整 DESIGN.md:https://www.designmdpro.app/websites/stripe-docs.md
在 V0 Prompt 生成器中自定义 →

常见问题

Stripe Docs 的主色是什么?

Stripe Docs 的品牌主色是靛蓝(#5469D4),其 DESIGN.md 共定义了 24 个颜色 token。

Stripe Docs 用的是什么字体?

Stripe Docs 的主要字体是 Menlo。

Menlo 有什么免费替代字体?

Menlo 是商用字体,Google Fonts 上的相近免费替代有 JetBrains Mono。

如何在 Tailwind CSS 或 shadcn/ui 中使用 Stripe Docs 的设计 token?

本页公开了 Stripe Docs 的主色 #5469D4。生成完整的 Tailwind 或 shadcn 主题需要完整的 DESIGN.md,可通过 DesignMD Pro 获取。

这份 Stripe Docs DESIGN.md 是官方的吗?

不是。这份文件由 DesignMD Pro 从 docs.stripe.com 的公开页面提取,与 Stripe Docs 无关联,也未获其认可。

Stripe Docs 的 DESIGN.md 最近一次更新是什么时候?

当前版本 1.0.0 提取于 2026年12月1日。

Stripe Docs 及其商标归各自所有者所有。DesignMD Pro 是独立项目,与 Stripe Docs 无任何关联,亦未获其认可;本 DESIGN.md 提取自其公开网站,仅供参考。