StyleKit

GitHub Style

GitHub 风格

Rate this style

GitHub design language style with clean interface hierarchy, a refined grayscale system, blue interactive color, monospace code fonts, and developer-friendly information architecture.

GitHub styleGitHub design systemPrimer design systemdeveloper tool uimonospace fontgrayscale palettecode syntax highlightingdocumentation sitedeveloper portfolioclean minimal interface

Best For

GitHub style / GitHub design system / Primer design system

Primary Move

Use GitHub blue #0969da as the primary interaction color

Watch Out

Do not use gradient backgrounds or colorful decorations

design.md

GitHub Style as a design document

One document describes the colour roles, type rules, spacing and component construction behind this style. Copy or download it into Claude Code or Codex.

Document view

GitHub Style — Style Reference

Greyscale builds the structure, blue handles interaction, and color always carries meaning.

Theme: light

GitHub Style is the default language of developer tooling: most of the surface is greyscale (white, #f6f8fa, #d0d7de, #656d76, #1f2328 across five steps), blue #0969da appears only on things you can click, and green, yellow and red exist only as semantics — pass, warning, failure. Radius is uniformly 6px, borders are 1px #d0d7de, and shadow is nearly absent. Code blocks in monospace on a light grey ground are its most recognisable element. Gradients, heavy shadows, non-semantic decorative color, serif type and lively animation are all refused.

Colors

NameValueTokenRole
Link Blue#0969da--color-link-blueThe only primary, used strictly on links, primary buttons and selection.
White#ffffff--color-whiteCards and content grounds — the only layering device against the light grey page.
Canvas Grey#f6f8fa--color-canvas-greyThe page canvas and code-block ground — the foundation of the whole interface.
Border Grey#d0d7de--color-border-greyEvery 1px border and divider — this one value and nothing else.
Muted Grey#656d76--color-muted-greyMetadata, timestamps and captions.
Ink#1f2328--color-inkHeadings and body — a blue-cast dark grey, softer than pure black.
Success#1f883d--color-successPassing, merged, success — semantic only.
Warning#9a6700--color-warningPending and needs attention — semantic only.
Danger#cf222e--color-dangerFailure, deletion and conflict — semantic only.

Typography

Inter — Interface text at small sizes, mostly 12 to 16px and rarely above 24px.
  • Substitute: -apple-system, 'Segoe UI', system-ui, sans-serif
  • Weights: 400, 500, 600
  • Sizes: 12, 13, 14, 16, 20, 24
  • Line height: 1.25 (display), 1.3 (headings), 1.5 (body)
  • Letter spacing: -0.01em on display, 0.02em on uppercase labels
JetBrains Mono — Code blocks, branch names, commit hashes and command lines — the monospace is its core identifier.
  • Substitute: ui-monospace, SFMono-Regular, Menlo, monospace
  • Weights: 400, 500
  • Sizes: 12, 13, 14
  • Line height: 1.4 (display), 1.4 (headings), 1.5 (body)
  • Letter spacing: 0 on display, 0.02em on uppercase labels
Type Scale
RoleFamilyWeightSizeLine HeightLetter SpacingToken
heading-lg—60024px1.25—--text-heading-lg
heading—60020px1.3—--text-heading
subheading—60016px1.4—--text-subheading
body—40014px1.5—--text-body
body-sm—40013px1.5—--text-body-sm
label—50012px1.40.02em--text-label

Spacing & Layout

Base unit: 4px Density: compact

Spacing Scale
NameValueToken
44px--spacing-4
88px--spacing-8
1212px--spacing-12
1616px--spacing-16
2424px--spacing-24
3232px--spacing-32
4848px--spacing-48
Border Radius
ElementValue
cards6px
buttons6px
inputs6px
pills999px
  • Page max-width: 1280px
  • Section gap: 24px
  • Card padding: 16px
  • Element gap: 8px

Components

Primary Button

Role: Primary action

Success green #1f883d fill, white text, 6px radius, a 1px rgba(31,35,40,0.15) border, no shadow, 14px/500, 5px 16px padding. Hover deepens the fill to #1a7f37; press adds an inset 0 1px 0 shadow at 10%. 80ms. The primary button is green while links are blue, and the two never swap roles.

  • Sizes: padding 5px 16px; label 14px
  • States: hover: darker fill; active: inset shadow
Repo Card

Role: Repository and content cards

White fill, 6px radius, a 1px #d0d7de border, 16px padding, no shadow. The title runs 16px/600 in link blue as the clickable element, description at 14px ink, and a 12px muted line below with a language dot, star count and update time. Hover leaves the border alone and simply underlines the title.

Code Block

Role: The code block, the identifying element

A #f6f8fa ground, 6px radius, a 1px #d0d7de border, 16px padding, JetBrains Mono at 13px on 1.5 leading, horizontally scrollable. Syntax highlighting uses five or six colors and never changes weight. A 12px muted copy button may sit top-right.

State Label

Role: State labels and badges

Fully rounded on a 10% semantic ground with semantic text and a 1px border at 25%, 12px/500, 2px 10px padding. Green for passing, yellow for pending, red for failure, blue for info. Every label carries text; color only assists.

Side Nav

Role: Side navigation and filters

White or transparent at 240px wide with no right border. Items are 32px tall on a 6px radius at 14px, with selection using a #f6f8fa ground plus a 2px link-blue left bar. Group headings sit 16px above at 12px/600 in muted grey.

Do's and Don'ts

Do
  • Five greyscale steps carry the structure
  • Blue appears only on clickable elements
  • Green, yellow and red express semantics only
  • Radius is always 6px, borders always #d0d7de
  • Code blocks use monospace on a light grey ground
  • Motion stays under 80ms with no bounce
Don't
  • No gradient backgrounds or colorful decoration
  • No heavy shadows
  • No non-semantic decorative color
  • No serif type
  • No oversized type or excessive spacing
  • No lively animation

Surfaces

LevelNameValuePurpose
0Canvas Grey#f6f8fa页面底
1White#ffffff卡片与列表容器

Elevation

  • None: none — 1px #d0d7de borders only
  • Overlay: 0 8px 24px rgba(31,35,40,0.12)

Imagery

Almost no imagery: avatars at 20 to 40px, 16px icons, 8px language dots. No illustration, photography or backgrounds — the interface is the content.

Layout

Capped at 1280px with 16px padding, 24px between sections and 16px between cards. The structure is a 240px rail beside a content area whose list rows run 56px. Density approaches a desktop application, with whitespace only between sections.

Agent Prompt Guide

Implementation Contract
  • Use the requested page, user task and real content as the brief. Implement only the requested scope; identify missing business information instead of inventing data or capabilities.
  • Inspect the current project, stack and components first. Reuse its structure, routes, dependencies and components; do not rebuild unrelated pages or features.
  • Use the project's breakpoints to adapt columns and spacing for narrow and desktop screens. Preserve hierarchy and prevent accidental horizontal overflow.
  • For interactions in scope, support keyboard focus and reduced motion, with applicable disabled, loading, empty and error states.
  • Run the project's existing checks after implementation. Report only tests and visual checks actually run, and list unverified behavior.

QUICK COLOR REFERENCE:

  • text: #1f2328
  • background: #f6f8fa
  • card: #ffffff
  • primary: #0969da
  • border: #d0d7de
  • muted: #656d76

EXAMPLE COMPONENT PROMPTS:

  1. Build a GitHub-style repository card: white fill, 6px radius, a 1px #d0d7de border, 16px padding, no shadow. Title at 16px/600 in #0969da, description at 14px #1f2328, and a 12px #656d76 line below with a language dot, star count and update time. Hover only underlines the title. The page ground is #f6f8fa, and code blocks use a #f6f8fa ground with 13px monospace, a 1px #d0d7de border and a 6px radius.

Similar Brands

  • Notion Style — Both low-stimulus, though Notion leans documents while GitHub leans code and state
  • Linear Style — Both tool interfaces, though Linear is dark while GitHub is light greyscale

Quick Start


:root {
  /* Colors */
  --color-link-blue: #0969da;
  --color-white: #ffffff;
  --color-canvas-grey: #f6f8fa;
  --color-border-grey: #d0d7de;
  --color-muted-grey: #656d76;
  --color-ink: #1f2328;
  --color-success: #1f883d;
  --color-warning: #9a6700;
  --color-danger: #cf222e;

  /* Typography — Font Families */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Typography — Scale */
  --text-heading-lg: 24px;
  --leading-heading-lg: 1.25;
  --text-heading: 20px;
  --leading-heading: 1.3;
  --text-subheading: 16px;
  --leading-subheading: 1.4;
  --text-body: 14px;
  --leading-body: 1.5;
  --text-body-sm: 13px;
  --leading-body-sm: 1.5;
  --text-label: 12px;
  --leading-label: 1.4;
  --tracking-label: 0.02em;

  /* Typography — Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;

  /* Spacing */
  --spacing-unit: 4px;
  --spacing-4: 4px;
  --spacing-8: 8px;
  --spacing-12: 12px;
  --spacing-16: 16px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --spacing-48: 48px;

  /* Layout */
  --page-max-width: 1280px;
  --section-gap: 24px;
  --card-padding: 16px;
  --element-gap: 8px;
  --density: compact;

  /* Border Radius */
  --radius-cards: 6px;
  --radius-buttons: 6px;
  --radius-inputs: 6px;
  --radius-pills: 999px;

  /* Surfaces */
  --surface-canvas-grey: #f6f8fa;
  --surface-white: #ffffff;
}

Community

Ratings & Feedback

No ratings yet - be the firstSign in to rate

Loading comments…

Component Templates

Component Preview

Button

FAQ

GitHub Style — Frequently Asked Questions

What is the GitHub Style design style?
GitHub design language style with clean interface hierarchy, a refined grayscale system, blue interactive color, monospace code fonts, and developer-friendly information architecture. Its core principle: GitHub Style is a design language originating from the GitHub platform, providing clear, efficient, and distraction-free working interfaces for tens of millions of developers worldwide.
What colors does GitHub Style use?
GitHub Style uses #0969da as its primary color and #ffffff as its secondary color, with accent colors #1f883d, #9a6700, #cf222e, #1d7f98. Every hex value can be copied from the palette on this page.
How do I apply GitHub Style correctly?
Key practices: Use GitHub blue #0969da as the primary interaction color. Use white #ffffff and light gray bg-[#f6f8fa] for backgrounds. Use #1f2328 (dark gray) and #656d76 (secondary gray) for text.
What are common mistakes with GitHub Style?
Avoid: Do not use gradient backgrounds or colorful decorations. Do not use large rounded corners rounded-2xl, rounded-full (except for avatars). Do not use heavy shadows shadow-lg, shadow-xl.
How do I prompt AI to generate GitHub Style UI?
Copy the ready-made AI prompt on this page — it bundles the design tokens and component rules — and paste it into ChatGPT, Claude, Claude Code, or Codex. Effective prompts include the keywords: GitHub style, GitHub design system, Primer design system, developer tool ui.
Global Styles

Global CSS

css
/* GitHub Style 全局样式 */

:root {
  --gh-blue: #0969da;
  --gh-green: #1f883d;
  --gh-yellow: #9a6700;
  --gh-red: #cf222e;
  --gh-fg: #1f2328;
  --gh-fg-muted: #656d76;
  --gh-bg: #ffffff;
  --gh-bg-subtle: #f6f8fa;
  --gh-border: #d0d7de;
  --gh-nav-bg: #24292f;
}

/* 基础文字样式 */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  color: var(--gh-fg);
  line-height: 1.5;
  font-size: 14px;
}

/* 代码块 */
.gh-code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 85%;
  background: var(--gh-bg-subtle);
  border-radius: 6px;
  padding: 0.2em 0.4em;
}

/* 仓库名称链接 */
.gh-repo-link {
  color: var(--gh-blue);
  font-weight: 600;
  text-decoration: none;
}
.gh-repo-link:hover {
  text-decoration: underline;
}

/* 标签/徽章 */
.gh-label {
  display: inline-block;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  border: 1px solid transparent;
  border-radius: 2em;
}

/* 分隔线 */
.gh-divider {
  border: none;
  border-top: 1px solid var(--gh-border);
  margin: 1rem 0;
}
@keyframes github-style-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

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

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

.github-style-gradient {
  background: linear-gradient(135deg, #0969da, #1f883d);
}

.github-style-gradient-text {
  background: linear-gradient(135deg, #0969da, #1f883d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.github-style-frosted {
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  background: rgba(9, 105, 218, 0.08);
}

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

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

Related Styles

Related Styles

Explore these styles for ready-made tokens and components.

GitHub Style and Fluent Design sit closest to each other. The table below gives the real differences in color, use case, and tags, so the choice between them is made on facts.

AttributeGitHub StyleFluent Design
Primary color#0969da#0078d4
Secondary color#ffffff#106ebe
Best forGitHub style / GitHub design system / Primer design systemFluent Design / Microsoft Fluent / acrylic material
Unique tags——
Design Philosophy

GitHub Style is a design language originating from the GitHub platform, providing clear, efficient, and distraction-free working interfaces for tens of millions of developers worldwide. Its design philosophy is "let the content speak."

Design Recipes

Recommended Combinations with GitHub Style

These curated recipes combine this style with layouts and animations, optimized for specific use cases.