Material 3
lint passMaterial 3 (Material You) is Google's design system for adaptive, expressive interfaces. Its colour system is generated from a seed via tonal palettes; the values here are the documented M3 baseline light scheme. Material 3 favours rounded shapes, tonal surfaces, Roboto typography, and a clear role-based colour model (primary, secondary, tertiary, surface, and their on-/container pairs).
best for: Mobile-first and cross-platform apps · Expressive consumer product UIs · Teams standardizing on Material You
## get the file
Actions## colors
- primary#6750A4
- on-primary#FFFFFF
- primary-container#EADDFF
- on-primary-container#21005D
- secondary-container#E8DEF8
- on-secondary-container#1D192B
- surface#FEF7FF
- on-surface#1D1B20
- surface-container#F3EDF7
- surface-variant#E7E0EC
- on-surface-variant#49454F
- outline#79747E
- outline-variant#CAC4D0
- error#B3261E
- on-error#FFFFFF
## typography
- displayRoboto · 3.5625rem · 400 · lh 1.12
- headlineRoboto · 2rem · 400 · lh 1.25
- titleRoboto · 1.375rem · 500 · lh 1.27
- bodyRoboto · 1rem · 400 · lh 1.5
- body-smRoboto · 0.875rem · 400 · lh 1.43
- labelRoboto · 0.875rem · 500 · lh 1.43
- codeRoboto Mono · 0.875rem · 400 · lh 1.5
## spacing
- xxs4px
- xs8px
- sm12px
- md16px
- lg24px
- xl32px
- 2xl48px
## shapes
- sm8px
- md12px
- lg16px
- xl28px
- full9999px
## component tokens
| component | property | value |
|---|---|---|
| button-filled | backgroundColor | {colors.primary} |
| textColor | {colors.on-primary} | |
| rounded | {rounded.full} | |
| padding | 10px 24px | |
| button-tonal | backgroundColor | {colors.primary-container} |
| textColor | {colors.on-primary-container} | |
| rounded | {rounded.full} | |
| padding | 10px 24px | |
| chip | backgroundColor | {colors.secondary-container} |
| textColor | {colors.on-secondary-container} | |
| rounded | {rounded.sm} | |
| padding | 6px 12px | |
| sheet | backgroundColor | {colors.surface} |
| textColor | {colors.on-surface} | |
| rounded | {rounded.lg} | |
| padding | {spacing.md} | |
| card | backgroundColor | {colors.surface-container} |
| textColor | {colors.on-surface} | |
| rounded | {rounded.md} | |
| padding | {spacing.md} | |
| field | backgroundColor | {colors.surface-variant} |
| textColor | {colors.on-surface} | |
| rounded | {rounded.sm} | |
| padding | 12px 16px | |
| caption | textColor | {colors.on-surface-variant} |
| typography | {typography.body-sm} | |
| divider | backgroundColor | {colors.outline-variant} |
| height | 1px | |
| divider-strong | backgroundColor | {colors.outline} |
| height | 1px | |
| badge-error | backgroundColor | {colors.error} |
| textColor | {colors.on-error} | |
| rounded | {rounded.full} | |
| padding | 2px 8px |
## preview as an app
See these tokens as full screens — an approximation of the system's language, not its official components.
## raw file
DESIGN.md — view raw file
---
version: alpha
name: Material 3
description: Google's Material Design 3 — expressive, tonal, and adaptive, built on a role-based colour model.
colors:
primary: "#6750A4"
on-primary: "#FFFFFF"
primary-container: "#EADDFF"
on-primary-container: "#21005D"
secondary-container: "#E8DEF8"
on-secondary-container: "#1D192B"
surface: "#FEF7FF"
on-surface: "#1D1B20"
surface-container: "#F3EDF7"
surface-variant: "#E7E0EC"
on-surface-variant: "#49454F"
outline: "#79747E"
outline-variant: "#CAC4D0"
error: "#B3261E"
on-error: "#FFFFFF"
typography:
display:
fontFamily: Roboto
fontSize: 3.5625rem
fontWeight: 400
lineHeight: 1.12
headline:
fontFamily: Roboto
fontSize: 2rem
fontWeight: 400
lineHeight: 1.25
title:
fontFamily: Roboto
fontSize: 1.375rem
fontWeight: 500
lineHeight: 1.27
body:
fontFamily: Roboto
fontSize: 1rem
fontWeight: 400
lineHeight: 1.5
body-sm:
fontFamily: Roboto
fontSize: 0.875rem
fontWeight: 400
lineHeight: 1.43
label:
fontFamily: Roboto
fontSize: 0.875rem
fontWeight: 500
lineHeight: 1.43
letterSpacing: 0.006em
code:
fontFamily: Roboto Mono
fontSize: 0.875rem
fontWeight: 400
lineHeight: 1.5
rounded:
sm: 8px
md: 12px
lg: 16px
xl: 28px
full: 9999px
spacing:
xxs: 4px
xs: 8px
sm: 12px
md: 16px
lg: 24px
xl: 32px
2xl: 48px
components:
button-filled:
backgroundColor: "{colors.primary}"
textColor: "{colors.on-primary}"
rounded: "{rounded.full}"
padding: 10px 24px
button-tonal:
backgroundColor: "{colors.primary-container}"
textColor: "{colors.on-primary-container}"
rounded: "{rounded.full}"
padding: 10px 24px
chip:
backgroundColor: "{colors.secondary-container}"
textColor: "{colors.on-secondary-container}"
rounded: "{rounded.sm}"
padding: 6px 12px
sheet:
backgroundColor: "{colors.surface}"
textColor: "{colors.on-surface}"
rounded: "{rounded.lg}"
padding: "{spacing.md}"
card:
backgroundColor: "{colors.surface-container}"
textColor: "{colors.on-surface}"
rounded: "{rounded.md}"
padding: "{spacing.md}"
field:
backgroundColor: "{colors.surface-variant}"
textColor: "{colors.on-surface}"
rounded: "{rounded.sm}"
padding: 12px 16px
caption:
textColor: "{colors.on-surface-variant}"
typography: "{typography.body-sm}"
divider:
backgroundColor: "{colors.outline-variant}"
height: 1px
divider-strong:
backgroundColor: "{colors.outline}"
height: 1px
badge-error:
backgroundColor: "{colors.error}"
textColor: "{colors.on-error}"
rounded: "{rounded.full}"
padding: 2px 8px
---
## Overview
Material 3 (Material You) is Google's adaptive, expressive design system. Its
colour is role-based: a `{colors.primary}` role plus container and `on-` pairs,
layered over tonal `{colors.surface}` and `{colors.surface-container}` surfaces.
Shapes are rounded, motion is lively, and Roboto carries a clear type hierarchy.
Colours here are the documented M3 baseline scheme (generated from the default
seed); a real product typically derives its own scheme from a brand seed.
Reach for Material 3 for adaptive, cross-platform apps and expressive consumer
products — especially anything Android-adjacent.
## Colors
- **primary (`#6750A4`) / on-primary (`#FFFFFF`)** — the main action colour and
its text; **primary-container (`#EADDFF`) / on-primary-container (`#21005D`)**
for tonal, lower-emphasis actions.
- **secondary-container (`#E8DEF8`) / on-secondary-container (`#1D192B`)** —
chips, filters, and secondary tonal surfaces.
- **surface (`#FEF7FF`) / surface-container (`#F3EDF7`)** — the base and raised
tonal surfaces; **on-surface (`#1D1B20`)** for primary text.
- **surface-variant (`#E7E0EC`) / on-surface-variant (`#49454F`)** — filled
fields and secondary text.
- **outline (`#79747E`) / outline-variant (`#CAC4D0`)** — control outlines and
quiet dividers.
- **error (`#B3261E`) / on-error (`#FFFFFF`)** — error states.
All role pairs above meet WCAG AA (on-role text on its role/container).
## Typography
Material 3 uses **Roboto** (Apache-2.0, on Google Fonts — no substitution), with
**Roboto Mono** for code. The scale runs from `{typography.display}` and
`{typography.headline}` for expressive titles, through `{typography.title}`, down
to `{typography.body}` / `{typography.body-sm}` for content and
`{typography.label}` for buttons and chips.
## Spacing & Layout
Layout follows a 4dp grid: `{spacing.xxs}` (4px) and `{spacing.xs}` (8px) for
tight insets, `{spacing.md}` (16px) for component padding, and `{spacing.lg}`–
`{spacing.2xl}` for section rhythm. Rounded shapes are core: use `{rounded.sm}`–
`{rounded.lg}` for most surfaces and `{rounded.full}` for buttons and chips.
## Components
- **button-filled** — `{colors.primary}` with `{colors.on-primary}`, fully
rounded (`{rounded.full}`).
- **button-tonal** — `{colors.primary-container}` with
`{colors.on-primary-container}` for lower-emphasis actions.
- **chip** — `{colors.secondary-container}` with `{colors.on-secondary-container}`.
- **sheet / card** — `{colors.surface}` and `{colors.surface-container}` tonal
surfaces with `{colors.on-surface}` text.
- **field** — `{colors.surface-variant}` filled input with `{colors.on-surface}`
text; label/helper in `{colors.on-surface-variant}` (see **caption**).
- **divider / divider-strong** — 1px hairlines in `{colors.outline-variant}` and
`{colors.outline}`.
- **badge-error** — `{colors.error}` with `{colors.on-error}`.
## Motion
Material motion is expressive but purposeful: emphasized easing, ~200–500ms for
container transforms, shorter for simple state changes. Honour
`prefers-reduced-motion`.
## Do's and Don'ts
- **Do** use role pairs correctly — `on-` colours only on their matching role or
container; **don't** place `{colors.on-primary}` on `{colors.surface}`.
- **Do** derive a scheme from a brand seed for production; **don't** ship the
baseline seed as a brand.
- **Do** embrace rounded shapes (`{rounded.sm}`–`{rounded.full}`); **don't**
square everything off.
- **Do** keep `{colors.error}` for error states; **don't** use it as an accent.
- **Do** layer tonal surfaces (`{colors.surface}` → `{colors.surface-container}`)
for hierarchy; **don't** rely on heavy shadows alone.
- **Do** set copy in Roboto and code in `{typography.code}`; **don't** mix
families within a run.
## Agent Prompt Guide
When generating UI in the Material 3 style:
1. Reference tokens by name (`{colors.primary}`, `{spacing.md}`,
`{typography.body}`) — never hardcode raw values.
2. Respect role pairs and WCAG AA: `on-` colours go only on their role/container.
3. Default composition: tonal `{colors.surface}` → `{colors.surface-container}`
cards → `button-filled` for the main action, `button-tonal`/`chip` for the rest.
4. Use rounded shapes and the 4dp spacing grid.
5. Use Roboto / Roboto Mono (both open) — never ship proprietary font binaries.
6. If a needed token/role 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/material-3/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/material-3/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/material-3/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/material-3/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/material-3/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/material-3/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/material-3/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/material-3/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 47 times · downloaded 0 times