Shape and boundaries
Choose shape by purpose, then use Tinyrack radius, border, and focus tokens to keep boundaries clear and nested surfaces coherent.
Choose shape by purpose
- Use
smormdfor compact controls whose boundary should remain crisp. - Use
lgorxlfor a distinct panel, popover, or overlay surface. - Use
fullonly when a pill, status, avatar, or circle communicates the role.
Radius and border scale
| Radius | Value | CSS variable |
|---|---|---|
xs | 0.125rem | --tinyrack-radius-xs |
sm | 0.25rem | --tinyrack-radius-sm |
md | 0.375rem | --tinyrack-radius-md |
lg | 0.5rem | --tinyrack-radius-lg |
xl | 0.75rem | --tinyrack-radius-xl |
full | 9999px | --tinyrack-radius-full |
Use default for normal boundaries, strong for stronger structure, and accent for a narrow emphasis edge. These map to --tinyrack-border-width-default, -strong, and -accent.
| Border | Value |
|---|---|
default | 1px |
strong | 2px |
accent | 3px |
Nest shapes deliberately
An inner surface should use the same or a smaller radius than its container. Account for padding and border width; do not place a visibly rounder rectangle inside a tighter outer boundary.
Let focus follow shape
Apply the focus outline to the interactive element so it follows that element's radius. Tinyrack uses --tinyrack-focus-width (2px) and --tinyrack-focus-offset (2px); do not replace the outline with a shape that clips or changes the control boundary.
Applied example
Implementation and reference
Use tinyrackRadii and tinyrackBorders in tooling, --tinyrack-radius-*, --tinyrack-border-width-*, and --tinyrack-focus-* in CSS, or the matching rounded-tinyrack-*, border, and outline utilities. Component --tr-* variables are the local override point.