Design Tokens

Establishing consistent geometric curvature scales across design system components

Clashing border radius values between small pill buttons, medium form inputs, and expansive modal sheets signal an uncoordinated design system. Defining a mathematical curvature ladder guarantees that every curved contour shares the same visual DNA.

Radius & Border Width Tokens

How to Use the Radius & Border Width Tokens (3 Simple Steps)

1

Choose Base Curvature Scale

Select your preferred aesthetic scale: Sharp/Technical (2px–6px), Modern Balanced (4px–12px), or Playful/Soft (8px–24px).

2

Configure Token Steps

Fine-tune values for --radius-sm, --radius-md, --radius-lg, --radius-xl, and --radius-full (pill/circle).

3

Copy Design System Tokens

Copy clean CSS custom properties and optional utility classes ready to integrate into your design token pipeline.

Features & CSS Best Practices

✓

Systematic Curvature Scale

Ensures that small buttons, medium input fields, large cards, and modal dialogs use proportional, harmonious corner radii.

✓

Nested Radius Formula

Helps prevent awkward nested corner gaps by calculating the correct inner radius: Outer Radius minus Border Width.

✓

Border Width Token Pairings

Includes coordinated border-width tokens (--border-1, --border-2) for subtle dividers and emphasized focus states.

✓

Rem & Px Unit Flexibility

Supports export in both modern rem units and crisp pixel values based on your team preferences.

Frequently Asked Questions

What is the nested corner radius rule?

When placing a rounded element inside another rounded container, the inner radius should equal the outer radius minus the padding gap. If inner radius equals outer radius, the corners look misaligned.

What is the standard border radius for modern web apps?

Most modern web applications use 6px–8px for inputs and buttons, 12px–16px for cards, and 9999px for pill tags and circular avatar badges.

How does --radius-full work in CSS?

Setting border-radius: 9999px; ensures that any element, regardless of dynamic width or height, rounds into a perfect pill or circle.

Can radius tokens be animated on hover?

Yes! Border-radius smoothly transitions in CSS, allowing buttons or cards to morph softer or sharper on user interaction.

How do I choose consistent border-radius tokens for a UI library?

Establish a proportional geometric scale: radius-sm (4px for badges), radius-md (8px for buttons and inputs), radius-lg (16px for cards), and radius-full (9999px for pill tags). Nesting inner cards inside outer containers requires inner radius = outer radius - padding.

How does concentric border radius math prevent awkward nested corners?

When nesting a child card inside a padded parent, setting identical radii creates an unnatural gap. Concentric geometry dictates that the child radius should equal the parent radius minus the container padding.

Can I export border radius tokens into Design Tokens Community Group (DTCG) format?

Yes. Our generator exports standard DTCG JSON format, making tokens immediately importable into Style Dictionary, Figma Tokens Studio, and cross-platform mobile SDKs.