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 buttonsradius.control8pxMenu items, autocomplete rows, chart tooltipsradius.card12pxPopovers, the command paletteradius.surface16pxFloating surfaces, toastsradius.pill9999pxAvatars, checkboxes, pill buttonsRules
- Rounded containers use a
radiusname. 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.pillis for shapes whose ends are always round, whatever their length.
Component radii
| Part | Token | Value |
|---|---|---|
| Button 2xs | --nyte-btn-radius-2xs | 4px · touch 8px |
| Button xs | --nyte-btn-radius-xs | 4px · touch 10px |
| Button sm | --nyte-btn-radius-sm | 6px · touch 12px |
| Button md | --nyte-btn-radius-md | 8px · touch 12px |
| Button lg | --nyte-btn-radius-lg | 8px · touch 14px |
| Button xl | --nyte-btn-radius-xl | 10px · touch 16px |
| Input md | --nyte-input-radius-md | 8px · touch 12px |
| Input lg | --nyte-input-radius-lg | 8px · touch 14px |
| Input xl | --nyte-input-radius-xl | 10px · touch 16px |
| Checkbox | --nyte-checkbox-radius | 4px |
| Row | --nyte-row-radius | 8px |
| Menu item | --nyte-menu-item-radius | 8px |
| Menu | --nyte-menu-radius | 14px |
| Dialog | --nyte-dialog-radius | 16px |