Shape draft v0.2.0
Corner radii and stroke widths: how round components are and how thick their borders are.
Two scales from the Figma library (Dimension), as they are, shape every component: corner radius, from sharp to fully round, and stroke width, from none to the strong focus stroke. Components and the docs site read them directly, each component choosing its radius and border width in its own tokens.
Tokens
Semantic tokens owned by the foundation (tokens in packages/components/specs/foundations/shape.spec.json). They live in packages/tokens/src/semantic/ (recreated from the Figma library) or tokens/additions/semantic/ (added by the design system), with their other values in tokens/modes/, tokens/additions/modes/ and tokens/platforms/.
| Token | Type | Value | Resolved | CSS |
|---|---|---|---|---|
corner-radius.none
|
dimension |
{"value":0,"unit":"px"}
|
0px
|
--corner-radius-none
|
corner-radius.3xs
|
dimension |
{"value":1,"unit":"px"}
|
1px
|
--corner-radius-3xs
|
corner-radius.2xs
|
dimension |
{"value":2,"unit":"px"}
|
2px
|
--corner-radius-2xs
|
corner-radius.xs
|
dimension |
{"value":4,"unit":"px"}
|
4px
|
--corner-radius-xs
|
corner-radius.sm
|
dimension |
{"value":8,"unit":"px"}
|
8px
|
--corner-radius-sm
|
corner-radius.md
|
dimension |
{"value":12,"unit":"px"}
|
12px
|
--corner-radius-md
|
corner-radius.lg
|
dimension |
{"value":16,"unit":"px"}
|
16px
|
--corner-radius-lg
|
corner-radius.xl
|
dimension |
{"value":20,"unit":"px"}
|
20px
|
--corner-radius-xl
|
corner-radius.2xl
|
dimension |
{"value":24,"unit":"px"}
|
24px
|
--corner-radius-2xl
|
corner-radius.full
|
dimension |
{"value":9999,"unit":"px"}
|
9999px
|
--corner-radius-full
|
stroke-width.none
|
dimension |
{"value":0,"unit":"px"}
|
0px
|
--stroke-width-none
|
stroke-width.sm
|
dimension |
{"value":0.6,"unit":"px"}
|
0.6px
|
--stroke-width-sm
|
stroke-width.md
|
dimension |
{"value":1.2,"unit":"px"}
|
1.2px
|
--stroke-width-md
|
stroke-width.lg
|
dimension |
{"value":2.4,"unit":"px"}
|
2.4px
|
--stroke-width-lg
|
Components following it
Derived from the component tokens aliasing the foundation's tokens.
| Component | Component tokens aliasing the foundation |
|---|---|
| Accordion |
|
| Alert |
|
| Avatar |
|
| Badge |
|
| Breadcrumb |
|
| Button |
|
| Card |
|
| Checkbox group |
|
| Checkbox |
|
| Divider |
|
| Dropdown |
|
| Icon button |
|
| Number field |
|
| Pagination |
|
| Progress bar |
|
| Radio group |
|
| Search field |
|
| Select |
|
| Skeleton |
|
| Slider |
|
| Spinner |
|
| Switch |
|
| Text field |
|
| Textarea |
|