Menu


How big things are: control heights, icon boxes, touch targets and the widths content may grow to.

Primitive and semantic tokensChanges with densityChanges with viewport

Size scale


  1. 44px
  2. 66px
  3. 88px
  4. 1212px
  5. 1616px
  6. 2020px
  7. 2424px
  8. 2828px
  9. 3232px
  10. 4040px
  11. 4444px
  12. 4848px
  13. 5656px
  14. 6464px
  15. 7272px
  16. 8080px
  17. 8888px
  18. 9696px

Guidelines


Purpose

The vocabulary of widths and heights that are not distances between things: how tall a control is, how big an icon is, the smallest box a finger can hit, how wide a column of content may grow, and the widths at which a layout may change shape. Spacing says how far apart; size says how big.

How it is structured

Primitives come in three runs. A run of small steps for controls, icons and boxes; a run of widths for columns, panels and pages; and a run of viewport widths that name the structural breakpoints. They share a group because they are all sizes, but they are read by different roles and are not interchangeable.

The semantic roles say what is being sized:

  • Control — the height of interactive things: buttons, fields, selects.
  • Icon — the box an icon glyph is drawn into, from the smallest inline marker to the large decorative size.
  • Target — the tap-area floors: the minimum the accessibility guidelines allow, and a more comfortable target for primary touch actions.
  • Selection — the box of a checkbox or radio.
  • Mark — the size of a small fixed mark inside a component: a dot, a bar, a key.
  • Content — the widths a column of content may grow to, from a narrow prose measure to the full page line.
  • Layout — a page's container widths, the measure of its text, the least width of a column, and the header's height.
  • List, tooltip and table — the most a scrolling list grows, the widest a tooltip gets, and the narrowest and widest a column of prose in a table.
  • Sidebar — the width of the expanded sidebar, authored here because Figma has no place for it.

Tiers

Both tiers reach CSS. Use a semantic role wherever the thing being sized has a name in the list above, because that is what lets a density change move every control together. A primitive step is for a fixed internal measurement with no role — the width of a caret, the thickness of a progress bar.

The viewport steps are primitives with no semantic layer, on purpose: a breakpoint is a structural fact about a layout, not a design intent, and a breakpoint belongs where the content needs a structural change rather than at a named device. The semantics that do sit on viewport steps are the breakpoints, documented under Breakpoints.

Context behavior

Density changes the control heights and nothing else in this group. Compact controls are one step shorter, except the smallest, which does not shrink because it is already at the minimum target floor. Icons, targets, selection boxes and content widths are the same under both densities, and target floors in particular must never compress.

A touch screen keeps every size. Nothing is drawn bigger or further apart for a finger. Instead, a control drawn smaller than the comfortable target takes an invisible press area round it, out to the comfortable target where nothing else pressable stands closer, and halfway to its neighbour where one does, so no two areas meet. No press area is ever smaller than the minimum target. A laptop with a touch screen and a mouse keeps the mouse behaviour.

The header's height is the one size that follows the screen: it has a phone value and a desktop value, which switch at the layout breakpoint and follow the layout attribute, as the components' narrow and wide forms do.

Theme and text size do not touch size.

Usage rules

Do

  • Size a control by its role, never by a primitive, so that density reaches it.
  • Give every interactive element at least the minimum target, and primary touch actions the comfortable target, even when the visible control is smaller. Padding or a pseudo-element can carry the difference.
  • Size icons by the icon roles, and let them inherit their color from the text they sit beside.
  • Cap reading text at a content width. Readability depends on line length, and the content roles are the sanctioned measures.

Don't

  • Write a pixel width or height in component CSS. The conformance checker rejects it.
  • Use a control height as a spacing value, or a spacing step as a height. The two groups look similar in value and mean different things.
  • Reference a viewport step inside a component to change its own layout. A component responds to the space it is given with a container query; viewport steps are for page-level structure.
  • Shrink a target below the minimum floor for any density.
  • Put a viewport step's custom property in a media query. CSS cannot read a custom property in a media query's condition, so take the number from the build's TypeScript or JSON output at build time instead.
  • Size a checkbox or radio box with an icon size, or an icon with a selection size. Some match in value today by coincidence, and either can change without the other.

Tokens


103 tokens in 12 groups. Open a group to see its tokens. The button beside a CSS name copies it, ready to paste; open a row for what the token is for and which components read it.

Scaleprimitive · 18 tokens
Size tokens: Scale
TokenValuePictureCSS
44px--smbk-size-4
66px--smbk-size-6
88px--smbk-size-8
1212px--smbk-size-12
1616px--smbk-size-16
2020px--smbk-size-20
2424px--smbk-size-24
2828px--smbk-size-28
3232px--smbk-size-32
4040px--smbk-size-40
4444px--smbk-size-44
4848px--smbk-size-48
5656px--smbk-size-56
6464px--smbk-size-64
7272px--smbk-size-72
8080px--smbk-size-80
8888px--smbk-size-88
9696px--smbk-size-96
Viewportprimitive · 6 tokens
Size tokens: Viewport
TokenValuePictureCSS
320320px--smbk-size-viewport-320
640640px--smbk-size-viewport-640
768768px--smbk-size-viewport-768
10241024px--smbk-size-viewport-1024
12801280px--smbk-size-viewport-1280
14401440px--smbk-size-viewport-1440
Widthprimitive · 12 tokens
Size tokens: Width
TokenValuePictureCSS
240240px--smbk-size-width-240
320320px--smbk-size-width-320
400400px--smbk-size-width-400
480480px--smbk-size-width-480
640640px--smbk-size-width-640
720720px--smbk-size-width-720
960960px--smbk-size-width-960
12001200px--smbk-size-width-1200
12801280px--smbk-size-width-1280
13601360px--smbk-size-width-1360
14401440px--smbk-size-width-1440
19201920px--smbk-size-width-1920
Iconsemantic · 6 tokens
Size tokens: Icon
TokenValuePictureCSS
xs12px--smbk-size-icon-xs
sm16px--smbk-size-icon-sm
md20px--smbk-size-icon-md
lg24px--smbk-size-icon-lg
xl32px--smbk-size-icon-xl
2xl40px--smbk-size-icon-2xl
Selectionsemantic · 3 tokens
Size tokens: Selection
TokenValuePictureCSS
sm16px--smbk-size-selection-sm
md20px--smbk-size-selection-md
lg24px--smbk-size-selection-lg
Contentsemantic · 4 tokens
Size tokens: Content
TokenValuePictureCSS
sm480px--smbk-size-content-sm
md720px--smbk-size-content-md
lg960px--smbk-size-content-lg
xl1360px--smbk-size-content-xl
Marksemantic · 4 tokens
Size tokens: Mark
TokenValuePictureCSS
sm16px--smbk-size-mark-sm
md20px--smbk-size-mark-md
lg24px--smbk-size-mark-lg
xl32px--smbk-size-mark-xl
Modalsemantic · 3 tokens
Size tokens: Modal
TokenValuePictureCSS
sm400px--smbk-size-modal-sm
md560px--smbk-size-modal-md
lg800px--smbk-size-modal-lg
Controlsemantic · 4 tokens
Size tokens: Control
TokenComfortableCompactPictureCSS
xs24px24px--smbk-size-control-xs
sm32px28px--smbk-size-control-sm
md40px32px--smbk-size-control-md
lg48px40px--smbk-size-control-lg
Columnsemantic · 3 tokens
Size tokens: Column
TokenValuePictureCSS
sm240px--smbk-size-column-min-sm
md320px--smbk-size-column-min-md
lg400px--smbk-size-column-min-lg
Layoutsemantic · 12 tokens
Size tokens: Layout
TokenValuePictureCSS
Container10
md720px--smbk-size-layout-container-md
default1360px--smbk-size-layout-container-default
3xl1360px--smbk-size-layout-container-3xl
xs480px--smbk-size-layout-container-xs
sm640px--smbk-size-layout-container-sm
lg960px--smbk-size-layout-container-lg
xl1200px--smbk-size-layout-container-xl
2xl1280px--smbk-size-layout-container-2xl
4xl1440px--smbk-size-layout-container-4xl
5xl1920px--smbk-size-layout-container-5xl
Measure2
body640px--smbk-size-layout-measure-body
heading720px--smbk-size-layout-measure-heading
Other size tokenssemantic · 28 tokens
Size tokens: Other size tokens
TokenPhoneDesktopPictureCSS
Target2
min24px24px--smbk-size-target-min
comfortable44px44px--smbk-size-target-comfortable
List1
max-height320px320px--smbk-size-list-max-height
Tooltip1
max-width240px240px--smbk-size-tooltip-max-width
Table2
prose-min240px240px--smbk-size-table-prose-min
prose-max480px480px--smbk-size-table-prose-max
Sidebar1
width280px280px--smbk-size-sidebar-width
Drawer1
width384px384px--smbk-size-drawer-width
Dropdown2
width240px240px--smbk-size-dropdown-width
max-width320px320px--smbk-size-dropdown-max-width
Command palette1
width640px640px--smbk-size-command-palette-width
Search1
width320px320px--smbk-size-search-width
Preview1
narrow360px360px--smbk-size-preview-narrow
Table of contents1
width240px240px--smbk-size-table-of-contents-width
Popover1
width320px320px--smbk-size-popover-width
Field1
control.width200px200px--smbk-size-field-control-width
Button note1
width240px240px--smbk-size-button-note-width
Date picker2
date-min-width168px168px--smbk-size-date-picker-date-min-width
time-width144px144px--smbk-size-date-picker-time-width
Filter bar1
sort-width240px240px--smbk-size-filter-bar-sort-width
Toolbar1
field-width200px200px--smbk-size-toolbar-field-width
Chart2
plot-height196px196px--smbk-size-chart-plot-height
donut140px140px--smbk-size-chart-donut
Progress ring2
md72px72px--smbk-size-progress-ring-md
sm36px36px--smbk-size-progress-ring-sm
Color area1
width224px224px--smbk-size-color-area-width
Color picker1
width256px256px--smbk-size-color-picker-width
Header1
height56px80px--smbk-size-header-height