Skip to content
Space & shapeMarkdown

Radius

Corner radii follow a seven-step scale from sharp architectural edges (0px) to full pills (9999px). Note that md (8px), lg (16px), and xl (24px) are larger than Tailwind's default scale.

Radius scale

TokenTailwindpxremUseShape
--radius-nonerounded-none0px0remArchitectural edges, tables
--radius-xsrounded-xs2px0.125remBadges, tags
--radius-smrounded-sm4px0.25rem24–32px controls (xs, sm)
--radius-mdrounded-md8px0.5rem40–48px controls (md, lg), inputs
--radius-lgrounded-lg16px1remCards
--radius-xlrounded-xl24px1.5remSheets, dialogs
--radius-fullrounded-full9999px624.9375remPills, avatars

Nested radius worked example

Formula: outer radius (16px, rounded-lg) = inner radius (8px, rounded-md) + padding (8px, p-2).

inner 8px + pad 8px = outer 16px

Calculate nested corners using outer radius = inner radius + padding so concentric edges share the same center point.

Usage

Apply radius utilities in Tailwind CSS or custom properties in CSS:

<div className="rounded-lg border border-border bg-card p-2">
  <div className="rounded-md border border-border bg-muted p-4">
    Nested container (8px + 8px = 16px)
  </div>
</div>
.card {
  border-radius: var(--card-radius);
  padding: var(--space-2);
}

.card-inner {
  border-radius: var(--radius-md);
}

Do and don't

Do: Keep nested corners concentric
Set outer radius to inner radius plus padding (for example, rounded-lg 16px around p-2 8px and rounded-md 8px).
Don't: Assume Tailwind default pixel values
Do not treat rounded-md, rounded-lg, or rounded-xl as Tailwind's default 6px, 8px, or 12px because Monoplinth maps them to 8px, 16px, and 24px.

Accessibility

  • Focus rings (2px outline with 2px offset) follow the element's border-radius automatically so keyboard focus tracks rounded controls cleanly.

Rationale

Distinct radius steps pair directly with control heights (sm for 24–32px, md for 40–48px) and surfaces (lg for cards, xl for dialogs), preventing mismatched corners.