Spacing layout

From moasq/nanowave · View interactive version

Spacing layout is an AI agent skill from the GitHub repository moasq/nanowave. Spacing and layout metrics: 8pt grid system, standard margins, 44pt tap targets, vertical rhythm, density guidelines. Use when setting padding, margins, spacing between elements, or ensuring touch target sizes. Triggers: padding, spacing, margin, tap target, 44pt, grid, density, contentMargins.

How to use this skill

Skill file

Spacing & Layout

8-POINT GRID SYSTEM:

All spacing values must be multiples of 4pt. Standard scale:

| Token | Value | Use Case |

|-------------------|-------|---------------------------------------------|

| Spacing.xxSmall | 4pt | Icon-to-label gap, tight inline spacing |

| Spacing.xSmall | 8pt | Between related items (label + value) |

| Spacing.small | 12pt | List row internal padding |

| Spacing.medium | 16pt | Standard padding, outer margins |

| Spacing.large | 24pt | Section spacing, card-to-card gap |

| Spacing.xLarge | 32pt | Major section breaks |

| Spacing.xxLarge | 48pt | Screen-level top/bottom breathing room |

NEVER use arbitrary values (5, 7, 10, 13, 15, 18, 25, etc.). Snap to the grid.

STANDARD MARGINS:

TAP TARGET SIZES:

.frame(minWidth: 44, minHeight: 44)

.contentShape(Rectangle())

VERTICAL RHYTHM:

DENSITY GUIDELINES (from plan's design.density):

CARD LAYOUT PATTERN:

VStack(alignment: .leading, spacing: AppTheme.Spacing.xSmall) {
    // Card content
}
.padding(AppTheme.Spacing.medium)
.background(AppTheme.Colors.surface)
.clipShape(RoundedRectangle(cornerRadius: AppTheme.Style.cornerRadius))
.shadow(color: .black.opacity(0.06), radius: 8, y: 4)

HORIZONTAL LAYOUTS:

SAFE AREA:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.