Skip to content
flyingsalmon

Radius

One base radius sets every corner, and each surface takes a step on the scale derived from it.

The base is --radius: 0.75rem, 12px. A larger surface gets a larger radius, so a container and the controls inside it follow the same curve. Change the base once and every corner in the system moves with it.

Tokens

Radius scale

SampleTokenValueJob
rounded-smradius × 0.6 (7.2px)Small marks: the checkbox, a date picker segment, a text link’s focus ring, a skeleton line.
rounded-mdradius × 0.8 (9.6px)Controls: buttons, field boxes, tabs, the tooltip, a calendar day.
rounded-lgradius (12px)Containers: cards, alerts, the date picker panel, a skeleton block.
rounded-xlradius × 1.4 (16.8px)Floating surfaces that cover the page: dialogs and drawers.
rounded-2xlradius × 1.8 (21.6px)Reserved for larger surfaces in an app.
rounded-3xlradius × 2.2 (26.4px)Reserved for larger surfaces in an app.
rounded-4xlradius × 2.6 (31.2px)Reserved for larger surfaces in an app.
rounded-full9999pxAnything circular or pill-shaped: avatars, switches, radio dots, badges.

Usage rules

  • Do
    Pick the step by the size of the surface: sm for marks, md for controls, lg for containers, xl for floating surfaces.The bigger the box, the bigger the curve it needs to look the same as its neighbours.
  • Do
    Round the inside of a nested surface one step less than the outside.A control in a card then follows the card’s corner instead of fighting it.
  • Don’t
    Give two surfaces of the same kind different corners.Two cards with different curves read as two different things, so the reader looks for a difference that is not there.
  • Do
    Make a shape fully round only when it is meant to be round, such as an avatar or a switch.A circle says “person” or “toggle”. A fully rounded card says nothing and loses its edge.

  • Spacing

    The scale for padding and gaps.
  • Principles

    Flat surfaces, where the corner does the work.
  • Card

    A container on the lg step.