PostHog Design System

Developer-friendly product analytics · Technical layout with bold retro-fun tones...
Back to Home
01

Visual Theme & Atmosphere

PostHog's marketing system is built on the visual contradiction at the heart of the brand: a serious open-source product analytics platform rendered as if it were a friendly engineering sketchbook. The chrome runs on a warm cream canvas ({colors.canvas}#eeefe9) — not white — and every page is dotted with hand-drawn hedgehog mascots in lab coats, lounge chairs, terminals, and reading glasses, scattered across the layout like marginalia in a textbook. Type sits in IBM Plex Sans Variable at olive-gray ({colors.body}#4d4f46) for body and deep olive-charcoal ({colors.ink}#23251d) for headlines, with weights stepped tightly between 400, 600, 700, and 800 to create hierarchy without color. The single saturated yellow-orange pill ({colors.primary}#f7a501) is the brand's only loud chromatic moment; everything else is cream, olive, white card, and the occasional pastel callout band.

The system has a distinctive two-mode body layout: marketing pages (home, workflows, pricing) lean on alternating-pastel callout bands and feature tiles in white cards on cream, while documentation pages add a sticky 240px left sidebar with a rounded outline-icon section list. Code samples are full-width dark blocks on {colors.surface-dark} (the same olive-charcoal that carries body ink, used inverted) inside white doc cards, creating the system's most distinctive visual moment: a dark-on-dark code island floating inside a white card on a cream canvas, with a hedgehog mascot doodled in the margin.

...

Key Characteristics:

  • Warm cream canvas ({colors.canvas} — #eeefe9) end-to-end with no surface alternation between sections — the page is one continuous sheet
  • ...

Live Visual Theme Representation:

Visual Theme Example

02

Color Palette & Roles

> Source pages: / (home), /pricing (pricing detail), /docs/product-analytics (docs article), /workflows (product feature page). The chrome palette is identical across all four pages — only doc-specific accents (callout-banner pastels, code-block dark surface) appear exclusively inside the docs experience.

Brand & Accent

  • PostHog Yellow ({colors.primary}#f7a501): the universal primary CTA. Sticky "Get started — free" pill in the top-right of every nav, hero CTAs, pricing-tier subscribe buttons, footer signup pill. The system's only saturated chromatic moment.
  • Yellow Pressed ({colors.primary-pressed}#dd9001): pressed state for the primary pill.
  • ...

Surface

  • Canvas ({colors.canvas}#eeefe9): the warm cream page background. End-to-end on every page; the brand's most distinctive surface choice.
  • Soft Surface ({colors.surface-soft}#e5e7e0): button-secondary fill, sub-nav strip background, inline-code chip background.
  • ...

Text

  • Ink ({colors.ink}#23251d): headlines, button text on light, primary nav links — deep olive-charcoal that reads near-black against cream.
  • Body ({colors.body}#4d4f46): default paragraph text, doc article body, inline link color before hover. The brand's most-used text color.
  • ...

Semantic

  • Link Blue ({colors.link-blue}#1d4ed8): inline anchor link inside body prose. The system's primary informational link color.
  • Link Teal ({colors.link-teal}#1078a3): doc-article inline link variant, paired with body text.
  • ...
primary
#f7a501
primary-pressed
#dd9001
primary-active
#b17816
on-primary
#23251d
ink
#23251d
body
#4d4f46
charcoal
#33342d
mute
#6c6e63
ash
#9b9c92
stone
#b6b7af
hairline
#bfc1b7
hairline-soft
#dcdfd2
on-dark
#ffffff
canvas
#eeefe9
surface-soft
#e5e7e0
surface-card
#ffffff
surface-doc
#fcfcfa
surface-dark
#23251d
link-blue
#1d4ed8
link-teal
#1078a3
accent-blue
#2c84e0
accent-blue-soft
#dceaf6
accent-red
#cd4239
accent-red-soft
#f7d6d3
accent-green
#2c8c66
accent-green-soft
#d9eddf
accent-purple
#7c44a6
accent-purple-soft
#e7d8ee
03

Typography Rules

Font Family

IBM Plex Sans Variable is the system's primary face — used across every text role on every page at weights 400 (regular), 500 (medium), 600 (semibold), 700 (bold), and 800 (extra-bold). Falls back through IBM Plex Sans-apple-systemsystem-ui → broad cross-platform sans stack.

ui-monospace + Source Code Pro carry code samples and inline-code chips at 14px / 1.43 line-height. Source Code Pro is the explicit display monospace; ui-monospace handles inline <code> chips.

The brand-distinctive choice is the mixed weight ladder (400 / 500 / 600 / 700 / 800) — most chrome lives in the 400–700 band, with weight 800 reserved exclusively for the larger display headlines on home and pricing. This gives the system its "engineering blog" feel: hierarchy is built from weight contrast much more than from size.

Hierarchy

TokenSizeWeightLine HeightLetter SpacingUse
..................

Principles

The hierarchy is explicitly built from weight + size + occasional uppercase transform — there is no italic style, no decorative display variant, no proprietary face. The biggest display moments use weight 800 with -0.6px tracking, and the body settles at 400 with 1.5 line-height; everything else fills the band between. Section eyebrows ({typography.heading-sm} and {typography.utility-xs}) consistently render uppercase, which gives the doc layout its textbook-chapter feel.

Note on Font Substitutes

...
Dynamic Preview:
display-xl size: 36px | weight: 700 | height: 1.5 | spacing: 0
The quick brown fox jumps over the lazy dog
display-lg size: 24px | weight: 800 | height: 1.33 | spacing: -0.6px
The quick brown fox jumps over the lazy dog
heading-lg size: 21px | weight: 700 | height: 1.4 | spacing: -0.5px
The quick brown fox jumps over the lazy dog
heading-md size: 20px | weight: 700 | height: 1.4 | spacing: 0
The quick brown fox jumps over the lazy dog
heading-sm size: 18px | weight: 700 | height: 1.5 | spacing: 0
The quick brown fox jumps over the lazy dog
heading-sm-mixed size: 18px | weight: 600 | height: 1.56 | spacing: 0
The quick brown fox jumps over the lazy dog
body-md size: 16px | weight: 400 | height: 1.5 | spacing: 0
The quick brown fox jumps over the lazy dog
body-strong size: 16px | weight: 600 | height: 1.5 | spacing: 0
The quick brown fox jumps over the lazy dog
body-sm size: 15px | weight: 400 | height: 1.71 | spacing: 0
The quick brown fox jumps over the lazy dog
body-sm-strong size: 15px | weight: 600 | height: 1.71 | spacing: 0
The quick brown fox jumps over the lazy dog
body-xs size: 14px | weight: 500 | height: 1.43 | spacing: 0
The quick brown fox jumps over the lazy dog
caption-md size: 14px | weight: 700 | height: 1.71 | spacing: 0
The quick brown fox jumps over the lazy dog
caption-sm size: 13px | weight: 500 | height: 1.5 | spacing: 0
The quick brown fox jumps over the lazy dog
caption-xs size: 12px | weight: 600 | height: 1.33 | spacing: 0
The quick brown fox jumps over the lazy dog
utility-xs size: 12px | weight: 700 | height: 1.33 | spacing: 0
The quick brown fox jumps over the lazy dog
link-md size: 16px | weight: 400 | height: 1.5 | spacing: 0
The quick brown fox jumps over the lazy dog
button-md size: 14px | weight: 700 | height: 1.5 | spacing: 0
The quick brown fox jumps over the lazy dog
button-sm size: 13px | weight: 500 | height: 1 | spacing: 0
The quick brown fox jumps over the lazy dog
code-sm size: 14px | weight: 400 | height: 1.43 | spacing: 0
The quick brown fox jumps over the lazy dog
code-xs size: 14px | weight: 500 | height: 1.43 | spacing: 0
The quick brown fox jumps over the lazy dog
04

Layout Principles

Spacing System

  • Base unit: 8px (with finer 2/4/6px steps for tight inline gaps in callout banners and pill buttons).
  • Tokens (front matter): {spacing.xxs} (2px) · {spacing.xs} (4px) · {spacing.sm} (8px) · {spacing.md} (12px) · {spacing.lg} (16px) · {spacing.xl} (24px) · {spacing.xxl} (32px) · {spacing.section} (80px).
  • ...

Grid & Container

  • Max width: ~1280px content area at desktop with 24px gutters (~48px at ultrawide). Doc article body sits at ~720px max width with the 240px sidebar pushing the article column right of center.
  • Marketing card grid: 4-up at desktop, 3-up at 1024px, 2-up at 768px, 1-up at 480px. Cards preserve a fixed 1:1 or 4:3 ratio.
  • ...

Whitespace Philosophy

Whitespace is generous on marketing pages and tight on doc pages. The home and workflows pages stack feature tiles with {spacing.lg} (16px) gutters and 24px internal padding, while doc articles tighten internal spacing to {spacing.md} (12px) between paragraphs to maximize information density. The cream canvas runs continuously through every section — there are no decorative dividers, no shaded section bands; only the 1px hairline beneath section eyebrows and footer column rules separate content blocks.

Grid Layout Wireframe Mockup:

Layout Grid Example

Layout Wireframe blueprint
1
2
3
4
5
6
7
8
9
10
11
12
Gutter spacing: 16px / 24px
Side Margins: 24px (Mobile) / 48px (Desktop)
Max Container Width: 1200px
05

Depth & Elevation

LevelTreatmentUse
.........
The system has no drop-shadow elevation in marketing or product chrome. Cards sit flat on cream with thin olive borders. The single inverted moment is the dark code-block surface used inside doc article body cards.

Decorative Depth

Depth comes entirely from illustration and the pastel callout band system, not from CSS effects:
  • Hand-drawn hedgehog mascots — characters in various costumes (lab coat, terminal, lounge chair, magnifying glass, hammock, hat) scattered across pages as marginalia. Always rendered as flat color illustrations, never photographs.
  • Pastel callout banners{component.banner-tip-blue} / -green / -red / -purple soft tinted side-rail panels inside doc articles, each prefixed with an emoji icon (💡 ✅ ⚠️ 📘) and carrying tip/warning/note copy.
  • ...

Elevation Level Showcase:

Elevation Level Example

Flat Surface (Level 0)

Used for background layers, sidebar headers, or baseline borders.

Low Elevation (Level 1 / Card)

Used for floating product elements, cards, and hover states.

High Elevation (Level 2 / Popover & Dropdown)

Used for modals, select menus, code editor tooltips, and overlay headers.

Border Radius & Shape Scale:

radius-sm 4px
radius-md 6px
radius-lg 8px
radius-pill Pill / Tag
06

Component Stylings

Border Radius Scale

TokenValueUse
.........
The radius vocabulary clusters around 4–6px for nearly everything; the only fully-rounded element is the pill-style sticky nav CTA and inline pill chips.

Photography Geometry

There is no photography. Visual elements are limited to:
  • Hedgehog character illustrations — flat-color cartoon hedgehogs ranging from ~80px (in-card mascot) to ~240px (hero illustration). Always at native aspect, never cropped to a frame.
  • Outline product icons in the doc sidebar — 20–24px rounded-square illustrations.
  • ...
...

Buttons

button-primary — the universal PostHog CTA

  • Background {colors.primary} (yellow-orange), text {colors.on-primary} (deep olive), type {typography.button-md}, padding 8px 16px, height 40px, rounded {rounded.md}.
  • ...
button-secondary — soft alternative on cream canvas
  • Background {colors.surface-soft} (#e5e7e0), text {colors.ink}, type {typography.button-md}, padding 8px 16px, height 40px, rounded {rounded.md}.
  • ...
button-tertiary — ghost text button
  • Background transparent, text {colors.ink}, type {typography.button-md}, padding 8px 12px, rounded {rounded.md}.
  • ...
button-disabled
  • Background {colors.surface-soft}, text {colors.ash} — flat soft cream-gray.

Tabs & Chips

product-tab + product-tab-active — major product section tabs

  • Default: transparent background, text {colors.body}, type {typography.body-strong}, padding 8px 12px, rounded {rounded.md}.
  • ...
pill-tab + pill-tab-active — compact filter pill
  • Default: transparent background, text {colors.body}, type {typography.button-sm}, padding 6px 14px, rounded {rounded.full}.
  • ...
badge-uppercase — text-only utility label
  • Background transparent, text {colors.body} in {typography.utility-xs} (uppercase) — used as in-list category prefix ("FEATURE FLAG", "EXPERIMENT", "HEATMAP").
badge-promo — small inline pill chip
  • Background {colors.accent-blue-soft}, text {colors.link-blue}, type {typography.caption-xs}, padding 2px 8px, rounded {rounded.full}.
  • ...

Inputs & Forms

text-input + text-input-focused

  • Default: background {colors.surface-card}, text {colors.ink}, 1px solid {colors.hairline}, type {typography.body-md}, padding 8px 12px, height 36px, rounded {rounded.md}.
  • ...
search-input — utility search field (doc sidebar, "Ask PostHog AI")
  • Same dimensions as text-input with a magnifier glyph at the left edge in {colors.mute}.

Cards & Containers

product-card — marketing tile / feature card

  • Container: background {colors.surface-card} (white), 1px solid {colors.hairline}, padding {spacing.xl} (24px), rounded {rounded.md}.
  • ...
doc-card — doc article body card
  • Container: background {colors.surface-doc} (#fcfcfa warm-white), 1px solid {colors.hairline}, padding {spacing.xl} (24px), rounded {rounded.md}.
  • ...
feature-tile — small marketing feature tile
  • Container: background {colors.surface-card}, 1px solid {colors.hairline}, padding {spacing.lg} (20px), rounded {rounded.md}.
  • ...
pricing-tier-card — pricing plan card
  • Container: background {colors.surface-card}, 1px solid {colors.hairline}, padding {spacing.xxl} (32px), rounded {rounded.md}.
  • ...
hedgehog-mascot-card — feature card with margin-anchored hedgehog
  • Same chrome as {component.product-card} but with a hand-drawn hedgehog illustration anchored in the right margin or top-right corner — the brand's signature card variant.

Callout Banners

banner-tip-blue + banner-tip-green + banner-tip-red + banner-tip-purple

  • Background {colors.accent-blue-soft} / {colors.accent-green-soft} / {colors.accent-red-soft} / {colors.accent-purple-soft}, text {colors.ink}, type {typography.body-md}, padding 16px 20px, rounded {rounded.md}.
  • ...

Code

code-block — dark code sample inside doc card

  • Container: background {colors.surface-dark} (deep olive-charcoal), text {colors.on-dark} in {typography.code-sm}, padding 16px 20px, rounded {rounded.md}.
  • ...
inline-code — small inline <code> chip
  • Background {colors.surface-soft}, text {colors.ink} in {typography.code-xs}, padding 2px 6px, rounded {rounded.xs} (2px).
  • ...

Navigation

primary-nav

  • Background {colors.canvas} (cream — same as the page), text {colors.ink}, height 56px, type {typography.body-strong}, rounded {rounded.none}.
  • ...
sub-nav-strip — secondary nav bar (under primary)
  • Background {colors.surface-soft}, text {colors.body} in {typography.body-xs}, height 40px, rounded {rounded.none}.
  • ...
doc-sidebar — sticky doc-page left sidebar
  • Background {colors.canvas}, text {colors.body} in {typography.body-xs}, width 240px, rounded {rounded.none}.
  • ...
Top Nav (Mobile)
  • Hamburger menu icon at left, PostHog wordmark + hedgehog at center, search + sticky yellow "Get started — free" CTA at right. Primary nav collapses into a full-height drawer that slides from the left.

Footer

footer-section

  • Background {colors.canvas}, text {colors.body} in {typography.body-xs}, padding 32px 24px, rounded {rounded.none}, with a 1px {colors.hairline} top rule.
  • ...

Inline

link-inline — body-prose anchor link

  • {colors.link-teal} (#1078a3) in body prose with no underline by default; underline appears on focus. The brand's primary inline link color.

Interactive Component Demonstrations:

Component Interactive Example

07

Do's and Don'ts

Do

  • Use {colors.canvas} (cream — #eeefe9) as the page body. Never substitute pure white as the canvas.
  • Reserve {colors.primary} (yellow-orange) for the primary CTA pill only. The "Get started — free" treatment is the brand's anchor.
  • Render the brand wordmark with the hedgehog illustration alongside it, not as a stand-alone wordmark. The hedgehog IS the brand identity.
  • Use IBM Plex Sans Variable across every text role — body 400, emphasis 600/700, display 800.
  • Stack content sections at {spacing.section} (80px) rhythm with no decorative dividers between them; let the cream canvas continue uninterrupted.
  • Use {component.banner-tip-blue} / -green / -red / -purple only inside doc article body for tip/warning/note panels — keep marketing chrome out of the four-color callout family.
  • Pair every code sample with the dark {component.code-block} surface; inline <code> chips use {component.inline-code} (cream surface-soft chip).
  • Anchor a hedgehog mascot illustration in feature tile margins on home and workflows pages — the system's signature decoration.

Don't

  • Don't introduce drop shadows on cards. Cards sit flat on cream with thin olive borders only.
  • Don't add a second saturated chromatic CTA. Yellow-orange is the only loud color in the system.
  • Don't replace the cream canvas with pure white or full-bleed dark hero bands. The cream is the brand.
  • Don't use the four-color callout banner pastels ({colors.accent-blue-soft}, -green, -red, -purple) as marketing-card backgrounds. They belong to inline doc content only.
  • Don't substitute the hedgehog illustration with a generic icon set. The character system is the brand.
  • Don't use uppercase transform outside of {typography.heading-sm}, {typography.utility-xs}, and {typography.caption-xs}. Uppercase is reserved for eyebrows and footer category headers.
  • Don't pad cards with 32px+ on all sides except for {component.pricing-tier-card}. Standard cards sit at 24px internal padding.
✅ Recommended / Do
  • Use {colors.canvas} (cream — #eeefe9) as the page body. Never substitute pure white as the canvas.
  • Reserve {colors.primary} (yellow-orange) for the primary CTA pill only. The "Get started — free" treatment is the brand's anchor.
  • Render the brand wordmark with the hedgehog illustration alongside it, not as a stand-alone wordmark. The hedgehog IS the brand identity.
  • Use IBM Plex Sans Variable across every text role — body 400, emphasis 600/700, display 800.
  • Stack content sections at {spacing.section} (80px) rhythm with no decorative dividers between them; let the cream canvas continue uninterrupted.
  • Use {component.banner-tip-blue} / -green / -red / -purple only inside doc article body for tip/warning/note panels — keep marketing chrome out of the four-color callout family.
  • Pair every code sample with the dark {component.code-block} surface; inline <code> chips use {component.inline-code} (cream surface-soft chip).
  • Anchor a hedgehog mascot illustration in feature tile margins on home and workflows pages — the system's signature decoration.
❌ Discouraged / Don't
  • Don't introduce drop shadows on cards. Cards sit flat on cream with thin olive borders only.
  • Don't add a second saturated chromatic CTA. Yellow-orange is the only loud color in the system.
  • Don't replace the cream canvas with pure white or full-bleed dark hero bands. The cream is the brand.
  • Don't use the four-color callout banner pastels ({colors.accent-blue-soft}, -green, -red, -purple) as marketing-card backgrounds. They belong to inline doc content only.
  • Don't substitute the hedgehog illustration with a generic icon set. The character system is the brand.
  • Don't use uppercase transform outside of {typography.heading-sm}, {typography.utility-xs}, and {typography.caption-xs}. Uppercase is reserved for eyebrows and footer category headers.
  • Don't pad cards with 32px+ on all sides except for {component.pricing-tier-card}. Standard cards sit at 24px internal padding.
08

Responsive Behavior

Breakpoints

NameWidthKey Changes
.........

Touch Targets

All interactive elements meet WCAG AA (≥ 40×40px). {component.button-primary} and {component.button-secondary} sit at 40px height with 16px padding. {component.text-input} sits at 36px (just under AAA but above AA at this size). {component.pill-tab} is ~32–36px height with 14px padding extending to ~44px tappable via inline padding. Doc-sidebar items use 14px text with ~32px line-height + 6px vertical padding for ~44px tap rows.

Collapsing Strategy

  • Primary nav: desktop horizontal cluster → tablet hamburger drawer at 768px. The yellow "Get started — free" CTA stays visible at every breakpoint.
  • Sub-nav strip: desktop horizontal anchor row → tablet horizontal scroll → mobile select dropdown.
  • ...

Image Behavior

The only "imagery" in the system is hand-drawn hedgehog illustrations rendered as inline SVG. They preserve their natural aspect at every breakpoint and scale via CSS width: auto; max-width: 100%. There is no responsive art-direction needed because there is no photography.

Responsive Adaptation Note:

Responsive Behavior Example

Interactive Viewport Simulator
Width: 800px (Desktop Mode) Grid Container
Primary Column

Adjusts layout width

Secondary Column

Folds on viewport change

Sidebar Column

Stacks to bottom on mobile

09

Agent Prompt Guide

1. Focus on ONE component at a time. Pull its YAML entry and verify every property resolves. 2. Reference component names and tokens directly ({colors.primary}, {component.button-primary-pressed}, {rounded.md}) — do not paraphrase.

  • ...

Copyable Agent Integration Prompt:

Prompt Guide Copy Box

10

Full System Design Tokens

The parsed design tokens extracted from the core stylesheet of this design system:

Design TokenHex ValueSystem Palette Role
--primary#f7a501System color representation for primary
--primary-pressed#dd9001System color representation for primary-pressed
--primary-active#b17816System color representation for primary-active
--on-primary#23251dSystem color representation for on-primary
--ink#23251dSystem color representation for ink
--body#4d4f46System color representation for body
--charcoal#33342dSystem color representation for charcoal
--mute#6c6e63System color representation for mute
--ash#9b9c92System color representation for ash
--stone#b6b7afSystem color representation for stone
--hairline#bfc1b7System color representation for hairline
--hairline-soft#dcdfd2System color representation for hairline-soft
--on-dark#ffffffSystem color representation for on-dark
--canvas#eeefe9System color representation for canvas
--surface-soft#e5e7e0System color representation for surface-soft
--surface-card#ffffffSystem color representation for surface-card
--surface-doc#fcfcfaSystem color representation for surface-doc
--surface-dark#23251dSystem color representation for surface-dark
--link-blue#1d4ed8System color representation for link-blue
--link-teal#1078a3System color representation for link-teal
--accent-blue#2c84e0System color representation for accent-blue
--accent-blue-soft#dceaf6System color representation for accent-blue-soft
--accent-red#cd4239System color representation for accent-red
--accent-red-soft#f7d6d3System color representation for accent-red-soft
--accent-green#2c8c66System color representation for accent-green
--accent-green-soft#d9eddfSystem color representation for accent-green-soft
--accent-purple#7c44a6System color representation for accent-purple
--accent-purple-soft#e7d8eeSystem color representation for accent-purple-soft
--focus-ringrgba(59,130,246,0.5)System color representation for focus-ring