Elements

Foundation

Padding

Padding is the internal spacing that separates content from a component's outer boundary. Consistent padding keeps dense product UI readable and gives marketing sections room to breathe. All values sit on the 4px grid defined in DESIGN.md.

Rules

  • Use spacing tokens from the 4px grid. Prefer Tailwind utilities (p-4, p-6, px-6) over hard-coded pixel values.
  • Cards never touch their edges: 24px internal padding minimum for card shells.
  • Product UI defaults to padding-md (24px) for panels. Step down to padding-sm (16px) only in dense lists and tables.
  • Marketing cards may scale padding up at md and lg breakpoints (p-7, p-8, p-10).
  • Section gutters are managed by Container and Section, not repeated on every child.
  • Pair larger padding with larger border radii on marketing surfaces.

Tokens

Semantic padding tokens map to CSS custom properties in globals.css and Tailwind spacing utilities. Use semantic names in documentation; use utilities in code.

padding-xs

p-2

8px

Micro gaps, icon insets, compact tag padding, bento cell gaps.

padding-sm

p-4

16px

Compact data: list rows, dialog body, select items, mobile section gutter (minimum).

padding-md

p-6

24px

Default card padding, widget body, notifications, app content area, desktop gutter (minimum).

padding-lg

p-8

32px

Featured marketing cards, testimonial quote blocks, wide blog card text columns.

padding-xl

px-12

48px

Section horizontal gutter (tablet+), tablet section vertical padding.

padding-2xl

py-24

96px

Section vertical padding (desktop), hero vertical padding (large breakpoints).

Usage

Compact data

padding-sm · 16px (p-4)

Components in a set that hold distinct information in a small area: table rows, widget list items, sidebar items, badge insets.

WidgetListItempx-5 py-3 (20px horizontal, 12px vertical)
Dialog bodyp-4
Badge mdpx-2 py-0.5
App shell tabpx-4

Variable height content

padding-md · 24px (p-6)

Components with varying content amounts: alerts, widgets, cards, popovers. Padding gives copy room to breathe.

Card (base)p-6
Notificationpx-5 py-4
Widget header / bodypx-5 py-4 / p-5
App content areap-6 (24px)

Card-based content

padding-md to padding-lg · 24–32px

Marketing cards and editorial blocks. Padding scales up on larger breakpoints when there is more room.

Card (marketing base)p-6
BlogCardWide text columnp-7 md:p-9 lg:p-10
StoryGrid tilep-7 md:p-8
Testimonial quote cardpx-8 pt-8 md:px-10 md:pt-10

Examples

Compact data · 16px row padding

Open items2

AGM minutes due

Harbour View · 3 days

Levy notice batch

Riverside Towers · 5 days

View all open items

List rows use px-5 py-3. Header and footer use px-5 with py-4 / py-3.

Variable height · 24px card padding

AGM date not confirmed

Soft warning background with 20px horizontal and 16px vertical padding.

Featured

Scheme onboarding

Card shell uses p-6 (24px) on all sides.

Marketing card · responsive padding
Product

Everything in one place

Wide marketing cards scale from p-6 (24px) to p-8 (32px) at md breakpoint.

Page & Section Layout

Full-bleed sections manage vertical rhythm. Container constrains horizontal width and applies the site gutter. Do not add duplicate horizontal padding on children inside a contained section.

Container gutter

Mobile: px-6 · 24pxDesktop: md:px-12 · 48px

Section and site-header horizontal inset

Section vertical (sm)

Mobile: py-12 · 48pxDesktop: md:py-16 · 64px

Compact bands, FAQ, tight sections

Section vertical (md)

Mobile: py-20 · 80pxDesktop: md:py-28 · 112px

Default marketing section rhythm

Section vertical (lg)

Mobile: py-24 · 96pxDesktop: md:py-32 · 128px

Hero-adjacent, feature showcases

Footer

Mobile: px-6 py-16Desktop: md:px-8 md:py-20

Dark section with link columns

Section + Container gutter

Section with contained=true

Horizontal gutter comes from Container (px-6 md:px-12). Vertical padding from Section spacing prop (py-12 md:py-16 for sm).

Full Spacing Scale

Padding tokens are a subset of the base spacing scale. Gaps between elements use the same values.

--space-114pxMicro gaps, icon padding
--space-228pxTight inline spacing, padding-xs
--space-3312pxSmall element gaps, list row vertical
--space-4416pxDefault element spacing, padding-sm
--space-6624pxCard padding, padding-md, app content
--space-8832pxSection sub-divisions, padding-lg, card grid gap
--space-121248pxComponent-level spacing, tablet gutter
--space-161664pxBetween major content blocks
--space-242496pxSection vertical padding (desktop)
--space-3232128pxHero vertical padding