Spacing That Doesn't Look AI-Generated
Use a consistent spacing scale and grouping logic instead of arbitrary padding values.
Paste this into your agent.
The single most common tell of a rushed or AI-generated interface is inconsistent spacing: every gap is a slightly different, unrelated number, and related elements aren't visually grouped.
When to use
- Any time you're laying out a new component or page from scratch.
- Reviewing an existing layout that "feels off" but you can't say why.
Principles
- Related elements sit closer together than unrelated ones. Spacing communicates grouping before color or borders do (this is the Gestalt law of proximity, applied literally).
- Use a spacing scale (e.g. 4, 8, 12, 16, 24, 32, 48, 64) and never step outside it. Arbitrary values like
13pxor22pxare a signal something wasn't deliberate. - The gap between groups should be visibly larger than the gap within a group — usually at least 2x.
Instructions
- Pick a base unit (4px is standard) and only use multiples of it for margin/padding/gap.
- When a section has a label + content, keep label-to-content spacing tight (4–8px) and section-to-section spacing loose (24–48px).
- Audit a finished layout by turning on the browser's box-model outline — if you can't tell which elements belong together just from spacing, tighten the within-group gaps.
- In card grids, the gap between cards should generally be smaller than each card's internal padding, or the grid reads as cluttered.
Examples
textCard padding: 24px
Gap between cards: 16px
Gap between card sections: 40px+
Avoid
- Don't add padding "until it looks right" without checking it against the scale — it accumulates into inconsistent rhythm across the page.
- Don't use equal spacing between every element on a page; uniform spacing removes all grouping information and makes dense layouts harder to scan.
References
- Gestalt principle of proximity; 4/8pt grid systems used in most modern design systems (Material, Apple HIG, Tailwind's default scale).
Add to your agent
Print this skill from the terminal, or connect the whole catalog over MCP. Setup guides
CLI
MCP server
Questions
Related skills
Antfu Designby antfu
antfu-style design conventions, broadened. UnoCSS-first, class-based semantic tokens with dual light/dark for tooling and devtools UIs, plus design-read, anti-slop, and micro-interaction polish for landing pages and product surfaces. Use when building or refactoring any interface with UnoCSS.
LayoutExternalGitHub stars: 6K
Banner Designby nextlevelbuilder
Design banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with AI-generated visuals. Actions: design, create, generate banner. Platforms: Facebook, Twitter/X, LinkedIn, YouTube, Instagram, Google Display, website hero, print. Styles: minimalist, gradient, bold typography, photo-based, illustrated, geometric, retro, glassmorphism, 3D, neon, duotone, editorial, collage. Uses ui-ux-pro-max, frontend-design, ai-artist, ai-multimodal skills.
VisualExternalGitHub stars: 142.5K
Beautiful Shadowsby MengTo
Use when a UI needs better depth, elevation, and shadow treatment without looking muddy.
VisualExternalGitHub stars: 7.1K
Bencium Innovative Ux Designerby bencium
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
VisualExternalGitHub stars: 470