Border Radius
Every form control uses 12px (rounded-lg). Containers get more: cards and dialogs use 24px (rounded-2xl). Eidetic overrides the Tailwind defaults, so rounded-lg is 12px here, not 8px.
Border Radius Scale
Defined as --radius-* tokens in src/styles/globals.css
radius-xs · rounded-xs
2px
Minimal rounding
2px
radius-sm · rounded-sm
4px
Checkboxes, small indicators
4px
radius-md · rounded-md
6px
Badges, tags, tooltips
6px
radius-lg · rounded-lg
12px
Buttons, inputs and every form control, menus, toasts
12px
radius-xl · rounded-xl
16px
Panels inside cards
16px
radius-2xl · rounded-2xl
24px
Cards, dialogs
24px
radius-3xl · rounded-3xl
28px
Large overlays
28px
radius-4xl · rounded-4xl
32px
Hero panels and feature tiles
32px
radius-full · rounded-full
9999px
Pill badges, avatars, dots
9999px
Component Radius Assignments
What the components ship today
| Component | Radius Token | Value | Reasoning |
|---|---|---|---|
| Button, Input, Select, pickers | radius-lg | 12px | One radius for every control, so they line up in a row |
| Dropdown menu, popover, toast | radius-lg | 12px | Same family as the control that opens them |
| Card | radius-2xl | 24px | Container, clearly larger than its contents |
| Dialog | radius-2xl | 24px | Major overlay |
| Badge (default) | radius-md | 6px | Small label |
| Badge (pill), Avatar | radius-full | 9999px | Round shape |
| Tooltip | radius-md | 6px | Small, informational |
Component Examples
The radius in real components
Controls (rounded-lg = 12px)
Cards (rounded-2xl = 24px)
Card Title
Cards use rounded-2xl (24px).
Elevated Card
The same radius works with a shadow.
Badges (rounded-md, or rounded-full with shape="pill")
Default
Success
Pill
Pill
Code Examples
Use the components; they carry the right radius. For custom elements:
// A custom control next to Eidetic controls
<div className="h-10 rounded-lg px-3.5" />
// Or reuse the shared size fragment
import { fieldSize } from '@/lib/control-size'
<div className={fieldSize.md} />
// A custom container
<div className="rounded-2xl bg-background-default p-6" />Guidelines
Keep radius consistent
- Controls use rounded-lg (12px). Buttons, inputs, selects and pickers share it at every size.
- Containers are rounder than their contents. A card (24px) holds controls (12px), never the other way around.
- Stay on the scale. No arbitrary values like rounded-[10px].