Foundations

Radius

Five named corners and the component radii built from them

Radius names say what a shape is, not how big it is. Five names cover containers; controls take their radius from their own size handle.

import { radius } from "@nyte-ai/ui/styles/schema.stylex";
radius.indicator4pxKeycaps, meters, small buttons
radius.control8pxMenu items, autocomplete rows, chart tooltips
radius.card12pxPopovers, the command palette
radius.surface16pxFloating surfaces, toasts
radius.pill9999pxAvatars, checkboxes, pill buttons

Rules

  • Rounded containers use a radius name. A control reads its radius from its size handle (button.radiusMd, input.radiusLg), so size and corner change together.
  • Nested corners stay concentric. The menu's 14px radius is its items' 8px plus its 6px padding.
  • Under a coarse pointer, control radii grow with the control. Never branch on touch by hand.
  • radius.pill is for shapes whose ends are always round, whatever their length.

Component radii

PartTokenValue
Button 2xs--nyte-btn-radius-2xs4px · touch 8px
Button xs--nyte-btn-radius-xs4px · touch 10px
Button sm--nyte-btn-radius-sm6px · touch 12px
Button md--nyte-btn-radius-md8px · touch 12px
Button lg--nyte-btn-radius-lg8px · touch 14px
Button xl--nyte-btn-radius-xl10px · touch 16px
Input md--nyte-input-radius-md8px · touch 12px
Input lg--nyte-input-radius-lg8px · touch 14px
Input xl--nyte-input-radius-xl10px · touch 16px
Checkbox--nyte-checkbox-radius4px
Row--nyte-row-radius8px
Menu item--nyte-menu-item-radius8px
Menu--nyte-menu-radius14px
Dialog--nyte-dialog-radius16px