CodeAI

Shape

The CADS shape system is broken into four categories: border radius, elevation, spacing, and stacking. Radius handles corners, elevation handles depth, spacing is the shared ramp for layout gaps, and stacking is the overlay z-index ladder.

Border radius

Border radius is broken into five steps from sm to round. Use the smaller values on compact controls, the larger ones on cards and panels, and round for pills. When nesting rounded elements, step down the scale so the corners stay concentric.

shape-sm6px
shape-md8px
shape-lg10px
shape-xl12px
shape-round999px

Elevation

Elevation is broken into three shadow levels: sm, md, and lg. Use sm for light lift on surfaces, md for menus and popovers, and lg when something needs to sit clearly above the page.

shadow-sm
shadow-md
shadow-lg

Spacing

Spacing is an 8px-based ramp for gaps between sections and components. Prefer these over one-off values; component internals already handle their own spacing.

8px
16px
24px
32px
40px
48px
56px
64px

Stacking

Stacking is a code-owned z-index ladder for portaled overlays — separate from elevation shadows. Menus and popovers share the modal layer so a Dropdown inside a Dialog or Popover paints above its host by mount order. Local in-component stacking (tabs, segmented controls) does not use these tokens.

VariableValueUse
1200Drawer (below centered dialogs)
1300Dialog and Modal
1300Dropdown menus and Breadcrumbs overflow (same layer as modal)
1300Popover (same layer as modal / dropdown)
1400Toast snackbar host
1500Tooltip and IconTooltip