Skip to main content

Sizing

The WPP DS sizing implements a comprehensive system that follows our grid and spacing guidelines.

Overview

Our sizing system enables you to create a layout with consistent and balanced sizing.

4 px sizing system

Use incremental sizing values with a step of 4 px to achieve the best visual accuracy and follow our Spacing guidelines. We also recommend adhering to our 24-grid layout architecture, as 4 px-based sizing works perfectly with it.

Max & min sizes

In some cases, we don't specify sizing values, but rather offer a minimum and maximum width, so that content can fit based on its size. For instance, Modals have min/max widths instead of a set size.

Best practices

Do:

  • Add custom sizing tokens within our 4 px sizing system.
  • Adhere to the layout and size of the specific components.

Don't:

  • Assign size values to dynamic elements, such as body or heading height.

Specification

TokenValueUsage
wpp-size-icon-m20 pxIcons
wpp-size-height-2020 pxInline message (Size S), Checkbox, Radio button
wpp-size-height-2424 pxText select, Toggle, Tag
wpp-size-height-2828 pxChip (Size S), Segmented Control Item S size
wpp-size-height-3232 px

Button (Size S), Input (Size S), Date (calendar), Inline message (Size M), Action button, Contained select (Size S), Dropdown menu item, Context menu item, Page control (Pagination), Segmented control bar (Size S), Segmented control item (Size M)

wpp-size-height-3636 pxChip (Size M)
wpp-size-height-4040 px

Button (Size M), Input (Size M), Numeric input with steps, Combined input & select, Contained select (Size M), Contained combobox multiple select, Tab, Segmented control bar (Size M)

wpp-size-height-4848 pxToast
wpp-size-height-5656 pxToast with actions
wpp-size-height-6060 pxModal header
wpp-size-height-6464 px
wpp-size-height-7272 px
wpp-size-height-8080 pxNavigation: Top bar