Spacing Foundation
Build an AI-ready Spacing Foundation without starting from scratch
Turn arbitrary gaps and padding into a consistent spacing rhythm your team can customize, document, and hand off to development
Trusted by Designers from
Spacing gets messy when gaps are created case by case. Most teams lack shared rules for rhythm, density, and implementation
_
Most spacing systems stop before they become usable infrastructure
Having spacing values is not the same as having a scale, rhythm rules, density logic, grouping guidance, and handoff structure
of teams connect tokens across design tools, code, and documentation
Source: zeroheight, 2026
+
of developers and designers say handoff between design and code could be improved
Source: Figma, 2025

1
Local spacing
Spacing values chosen locally without shared scale or usage rules
2
Shared values
Reusable values grouped by size or visual appearance
3
Primitive tokens
Spacing values organized into a structured primitive tokens
4
Semantic roles
Spacing tokens mapped to gaps, padding, and density
5
Documented rules
Rules explain grouping, density, usage, and exceptions
6
System layer
AI context, handoff, and density modes work from one model
Bring structure to your spacing system, wherever you're starting from
Start from scratch, clean up existing spacing values, prepare handoff, or customize your spacing rhythm with AI
Start with rhythm, not just pixel values
Turn gaps, padding, and margins into a system for grouping, hierarchy, and product density
Turn spacing values into a system
Audit existing gaps, clean up local exceptions, and define reusable spacing rules
Use AI without breaking spacing logic
Adapt spacing scale, density, and naming with AI while preserving product rhythm
Bridge between design and code
Connect spacing roles to token meaning, layout behavior, and implementation rules
From arbitrary gaps to a consistent spacing rhythm
Turn disconnected spacing values into a structured scale, density rules, grouping logic, and developer-readable handoff

Arbitrary gaps without clear usage
Shared spacing scale with clear usage logic
Padding created case by case
Defined padding, gap, and grouping rules
Developers guess which spacing value to use
Developer-readable spacing handoff
Density handled inconsistently
Density decisions documented
Similar patterns use different spacing
Consistent layout rhythm across product surfaces
Spacing values hardcoded in implementation
Spacing tokens mapped to implementation rules
Turn local spacing choices into reusable system roles
Replace disconnected gaps and padding with semantic roles for layout rhythm, grouping, density, and handoff

Before
Local gaps, mixed padding, unclear grouping logic, and repeated decisions

After
Spacing scale, rhythm rules, density logic, and developer-readable handoff
Customize, document, and hand off your spacing foundation
Adapt spacing roles, document rhythm rules, and give developers the logic behind gaps, padding, density, and implementation

Figma file
fig
Build from a structured spacing foundation with tokens, semantic roles, density modes, and documentation in one file

Setup guide
Customize your spacing scale, density rules, grouping logic, and workflow step by step without breaking the system structure

AI prompts
Audit spacing values, adapt spacing roles, review density risks, and prepare handoff with repeatable prompts
AI context
Md
Give an LLM the spacing rules and constraints for safer customization
NotebookLM source
Md
Explore the system and generate briefings from one source
Accessibility
Md
Review touch support, cramped layouts, grouping clarity, and density risks
Dev handoff
Md
Explain spacing roles, token mapping, density behavior, and implementation guidance
Make spacing decisions easier for devs to implement consistently
The dev handoff file explains spacing roles, density, gap vs padding, and implementation rules

Token meaning
Explain what spacing tokens represent and how to use them in design and code
Rhythm logic
Clarify stack, inline, layout gap, padding, and density relationships across product surfaces
Usage rules
Show where spacing roles should and should not be used to avoid local exceptions
Implementation notes
Give developers the logic behind spacing, density, and implementation
Use AI with spacing system context, not generic prompts
Give Claude or another LLM the rules, constraints, and spacing logic it needs to help without inventing a new system
OpenAI frames context optimization as a core lever for improving LLM accuracy
Source: OpenAI, LLM Accuracy Guide

Role-safe changes
Adapt spacing, density, grouping, and naming without breaking the system model
System-aware audit
Find arbitrary gaps, duplicate values, unclear roles, and inconsistent spacing usage
Accessibility review
Check density, cramped elements, grouping clarity, and touch support risks
Handoff-ready notes
Turn spacing logic into clearer explanations for developers
It's been quite helpful to wrangle all of these seemingly disparate systems into a singular lens and understand how to get started
Dallas Kwok
Lead Designer
Use Spacing Foundation when spacing decisions get inconsistent
Whether you are starting from scratch, cleaning up gaps and padding, defining density logic, or preparing developer handoff
Start from scratch with a spacing system
When you are building a new product or design system, spacing decisions can turn into disconnected values quickly. Spacing Foundation gives you a structured model from day one: spacing scale, semantic roles, density logic, documentation, AI context, accessibility notes, and developer handoff
Outcome
You start with a spacing foundation that is ready to customize instead of inventing every rule from zero
Adapt existing spacing values into product roles
Audit messy gaps and padding
Prepare handoff without guesswork
Deliver client-ready spacing foundations
Built for teams and designers working on spacing systems
Use Spacing Foundation when gaps, padding, density, and rhythm need to be structured, customized, documented, and handed off
01
Product designers
Keep interfaces consistent with reusable spacing roles for forms and content groups
02
UI designers
Turn visual spacing choices into rules for rhythm, grouping, density, and consistency
03
Freelancers and agencies
Deliver client-ready spacing foundations with documentation, AI context, and handoff
04
Design system leads
Standardize existing spacing values with clearer roles, naming, density, and usage rules
Based on analysis of 100+ design systems. Patterns translated into a reusable spacing foundation
Since 2023, Design Systems Surf has cataloged mature design systems across foundations, components, documentation, and implementation patterns.
Spacing Foundation turns that research into reusable spacing roles, density rules, AI context, accessibility guidance, and handoff.
Save 24–36 hours on spacing system work and documentation
Spacing Foundation removes repetitive setup, documentation, AI context, accessibility, and handoff work
Trusted by designers working on design systems
Feedback from people building, auditing, documenting, and maintaining design systems
10k+
Designers across 175+ countries follow Design Systems Surf for design system examples, patterns, and practical resources
What to know before you start
Clear answers about what Spacing Foundation includes, how it can be customized, and how it fits into real design system work
Is this just a Figma template?
No. The Figma file is one part of the package. Spacing Foundation also includes AI context .md, NotebookLM source .md, setup guidance, AI prompts, accessibility .md, and dev handoff .md.
The Figma file gives you the working spacing system. The Markdown files support different AI workflows: customization, knowledge exploration, accessibility review, and developer handoff.
What is included?
Can I customize it?
Will this fit my brand?
Can I use it with an existing design system?
Do I need to use AI?
Are the Markdown files standalone guides?
What does the NotebookLM source do?
What does the accessibility file do?
What does the dev handoff file do?
Does this include components?
Does this support density modes?
Who is this for?
Is this for beginners or advanced teams?
How is this different from building it myself?
Will developers be able to use it?
Can I use this for client work?
What is not included?
Still have questions?
Reach out at hey@designsystems.surf















