Border Radius
Consistent border radius tokens for rounded corners across all components.
lg (default)
Code
Usage
// Basic usage
<div className="rounded-lg">Large radius</div>
<div className="rounded-sm">Small radius</div>
<div className="rounded-full">Full circle</div>
// CSS Variable (default)
:root {
--radius: 0.75rem; /* 12px */
}
// Computed values
rounded-sm = calc(var(--radius) - 4px) /* 8px */
rounded-md = calc(var(--radius) - 2px) /* 10px */
rounded-lg = var(--radius) /* 12px */Reference
Radius Scale
rounded-none
No rounding
0pxrounded-sm
Subtle rounding
8pxrounded
Default rounding
4pxrounded-md
Medium rounding
10pxrounded-lg
Large rounding (default)
12pxrounded-xl
Extra large rounding
16pxrounded-2xl
2x large rounding
20pxrounded-3xl
3x large rounding
24pxrounded-full
Full circle/pill
9999pxDefault Value
rounded-lg (default)
CSS Variable:
--radius: 0.75rem (12px)Usage Guidelines
When to Use
Use small radius (sm, default) for buttons, input fields, and small interactive elements. Use medium to large radius (md, lg) for cards, modals, and containers. Use extra large radius (xl, 2xl) for prominent elements and hero sections.
Use rounded-full for avatars, badges, and pill-shaped elements. The default radius (rounded-lg) is calculated from the --radius CSS variable, making it easy to theme your entire design system.
Best Practices
- Use rounded-lg as the default for most components
- Smaller radius (sm) for inputs and buttons
- Larger radius (xl, 2xl) for cards and modals
- Use rounded-full sparingly for avatars and badges
- Maintain consistency within component types