Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cognite.com/llms.txt

Use this file to discover all available pages before exploring further.

Spacing

Spacing is the negative area between elements and components both horizontally and vertically. It is commonly controlled in code with gap, margin or padding. Every part of a UI should be intentional including the empty space between elements. The amount of space between items creates relationships and hierarchy.

Guidelines

Creating relationships

  • Elements in a design that are near each other are seen as being meaningfully related. As more space is added between elements, their perceived relationship weakens.
  • Space can also be used to denote groups of associated information. This creates content sections on a page without having to use lines or other graphical elements as a divider.

Creating hierarchy

  • Elements that have more spacing around them tend to be perceived as higher in importance than elements that have less space around them.
  • Elements that are set close to each other can be easily overlooked. Users may see the grouping but not process each individual item. Therefore, if you have an element or content of high importance on the page, consider giving it extra surrounding space to help it attract focus.

White space

  • Empty space - also known as white space - is important in design. It can be used to break up sections on a page or to help create focus on certain element(s).
  • White space helps with information processing; too much dense information can be disorienting or overwhelming for a user. Sections of a UI are allowed to be dense, but the whole page should not be crowded; there should always be enough white space to let the user’s eyes rest.
The Utility classes variable collection in Figma groups sizing utilities by name prefix (padding/…, margin/…, and so on). Each utility aliases a spacing, radius, or border-width primitive and resolves to a pixel value in the default mode. The tables below list those groupings.

Tokens

Padding

Applied as top, right, bottom, left padding within a component or UI element.
Utility variableAliased tokenValue
padding/p-2spacing/22 px
padding/p-4spacing/44 px
padding/p-6spacing/66 px
padding/p-8spacing/88 px
padding/p-12spacing/1212 px
padding/p-14spacing/1414 px
padding/p-16spacing/1616 px
padding/p-20spacing/2020 px
padding/p-24spacing/2424 px
padding/p-28spacing/2828 px
padding/p-32spacing/3232 px
padding/p-36spacing/3636 px
padding/p-40spacing/4040 px

Margin

Applied as top, right, bottom, left margin outside of a component or UI element.
Utility variableAliased tokenValue
margin/m-4spacing/44 px
margin/m-6spacing/66 px
margin/m-8spacing/88 px
margin/m-12spacing/1212 px
margin/m-16spacing/1616 px
margin/m-20spacing/2020 px
margin/m-24spacing/2424 px
margin/m-28spacing/2828 px
margin/m-32spacing/3232 px
margin/m-36spacing/3636 px
margin/m-40spacing/4040 px
margin/m-44spacing/4444 px
margin/m-48spacing/4848 px
margin/m-52spacing/5252 px
margin/m-56spacing/5656 px
margin/m-60spacing/6060 px
margin/m-64spacing/6464 px
margin/m-68spacing/6868 px
margin/m-72spacing/7272 px
margin/m-76spacing/7676 px
margin/m-80spacing/8080 px

Size

Size is the vertical height of components and are used to create visual consistency across the system. Use size tokens to setup component’s height or as a reference to calculate the final size of the component. Each size has a prefixed height and name for easy reference. For example, our Button component is available in three sizes: small (28px), default - or medium - (36px), and large (40px).

Guidelines

Consistency across components

  • Use the same size components consistently across similar components to maintain alignment, rhythm, and predictable behavior throughout the interface.
  • This helps prevent visual noise and ensures that mixed components (like inputs and buttons) align cleanly in layouts.

Touch target best practices

  • Always aim for a minimum touch target of 40-44px for tappable elements on mobile to meet accessibility guidelines and user comfort.
  • If this is not feasible in height, ensure the width is wide enough to be easily accessible.

Variable height

  • Some components don’t have a fixed height, so they can grow vertically and adapt to the amount of content they hold. In these components, padding is important to align on.

Corresponding radius

  • Each size corresponds with a preferred radius value. This is because the size and corner radius are often proportional to one another and should scale accordingly, with the exception of rounded fully corner radii.
  • For example, default Buttons and Inputs (36px h) always use an 8px corner radius. However, small Butons and Inputs (28px h) use a 6px corner radius.

Tokens

Width

Applied as a fixed width to a component, e.g., Button.
Utility variableAliased tokenValue
width/w-4spacing/44 px
width/w-8spacing/88 px
width/w-16spacing/1616 px
width/w-20spacing/2020 px
width/w-24spacing/2424 px
width/w-28spacing/2828 px
width/w-32spacing/3232 px
width/w-36spacing/3636 px
width/w-40spacing/4040 px
width/w-44spacing/4444 px
width/w-48spacing/4848 px

Min-width

Applied when a min width is set to a component or container, e.g., Dialog.
Utility variableAliased tokenValue
min-width/min-w-4spacing/44 px
min-width/min-w-8spacing/88 px
min-width/min-w-16spacing/1616 px
min-width/min-w-20spacing/2020 px
min-width/min-w-24spacing/2424 px
min-width/min-w-28spacing/2828 px
min-width/min-w-32spacing/3232 px
min-width/min-w-36spacing/3636 px
min-width/min-w-40spacing/4040 px
min-width/min-w-44spacing/4444 px
min-width/min-w-48spacing/4848 px

Max-width

Applied when a max width is set to a component or container, e.g., Dialog.
Utility variableAliased tokenValue
max-width/max-w-4spacing/44 px
max-width/max-w-8spacing/88 px
max-width/max-w-16spacing/1616 px
max-width/max-w-20spacing/2020 px
max-width/max-w-24spacing/2424 px
max-width/max-w-28spacing/2828 px
max-width/max-w-32spacing/3232 px
max-width/max-w-36spacing/3636 px
max-width/max-w-40spacing/4040 px
max-width/max-w-44spacing/4444 px
max-width/max-w-48spacing/4848 px
max-width/max-w-52spacing/5252 px
max-width/max-w-56spacing/5656 px
max-width/max-w-60spacing/6060 px
max-width/max-w-64spacing/6464 px
max-width/max-w-68spacing/6868 px
max-width/max-w-72spacing/7272 px
max-width/max-w-76spacing/7676 px
max-width/max-w-80spacing/8080 px
max-width/max-w-84spacing/8484 px
max-width/max-w-88spacing/8888 px
max-width/max-w-92spacing/9292 px
max-width/max-w-96spacing/9696 px
max-width/max-w-100spacing/100100 px

Height

Applied as a fixed height to a component, e.g., Button.
Utility variableAliased tokenValue
height/h-4spacing/44 px
height/h-8spacing/88 px
height/h-16spacing/1616 px
height/h-20spacing/2020 px
height/h-24spacing/2424 px
height/h-28spacing/2828 px
height/h-32spacing/3232 px
height/h-36spacing/3636 px
height/h-40spacing/4040 px
height/h-44spacing/4444 px
height/h-48spacing/4848 px

Min-height

Applied when a min height is set to a component or container, e.g., Textarea.
Utility variableAliased tokenValue
min-height/min-h-4spacing/44 px
min-height/min-h-8spacing/88 px
min-height/min-h-16spacing/1616 px
min-height/min-h-20spacing/2020 px
min-height/min-h-24spacing/2424 px
min-height/min-h-28spacing/2828 px
min-height/min-h-32spacing/3232 px
min-height/min-h-36spacing/3636 px
min-height/min-h-40spacing/4040 px
min-height/min-h-44spacing/4444 px
min-height/min-h-48spacing/4848 px

Max-height

Applied when a max height is set to a component or container, e.g., Textarea.
Utility variableAliased tokenValue
max-height/max-h-4spacing/44 px
max-height/max-h-8spacing/88 px
max-height/max-h-16spacing/1616 px
max-height/max-h-20spacing/2020 px
max-height/max-h-24spacing/2424 px
max-height/max-h-28spacing/2828 px
max-height/max-h-32spacing/3232 px
max-height/max-h-36spacing/3636 px
max-height/max-h-40spacing/4040 px
max-height/max-h-44spacing/4444 px
max-height/max-h-48spacing/4848 px
max-height/max-h-52spacing/5252 px
max-height/max-h-56spacing/5656 px
max-height/max-h-60spacing/6060 px
max-height/max-h-64spacing/6464 px
max-height/max-h-68spacing/6868 px
max-height/max-h-72spacing/7272 px
max-height/max-h-76spacing/7676 px
max-height/max-h-80spacing/8080 px
max-height/max-h-84spacing/8484 px
max-height/max-h-88spacing/8888 px
max-height/max-h-92spacing/9292 px
max-height/max-h-96spacing/9696 px
max-height/max-h-100spacing/100100 px

Radius

Corner radius (or radii) are the rounded corners in components.

Guidelines

  • Radius size is dependent on the size, or height, of the component, with the exception of full rounded radii.
  • When applying a radius to non-Aura components, consider the size and scale. Use a larger radius for larger components and a smaller radius for smaller components.
  • Don’t mix radius styles (e.g., rounded and sharp within the same component or UI element) as it can create inconsistency and visual clutter.

Tokens

Utility variableAliased tokenValue
border/rounded-noneradius/none0 px
border/rounded-xsradius/xs2 px
border/rounded-smradius/sm4 px
border/rounded-mdradius/md6 px
border/rounded-lgradius/lg8 px
border/rounded-xlradius/xl12 px
border/rounded-2xlradius/2xl16 px
border/rounded-3xlradius/3xl24 px
border/rounded-4xlradius/4xl32 px
border/rounded-fullradius/full9999 px

Stroke width

Stroke thickness (or border weight) is used sparingly across the system to maintain a clean, minimal visual style. When applied, stroke weight should reinforce hierarchy, clarity, and accessibility without introducing visual noise.

Guidelines

  • Avoid strokes unless necessary for clarity, separation, or emphasis.
  • When a stroke is required, use 1px for subtle borders or visual definition.
  • Ensure the appropriate border token color is used when a stroke is applied to an element. This ensures enough color contrast.
  • Use elevation and spacing first to define hierarchy—stroke should be a secondary tool.

Tokens

Utility variableAliased tokenValue
border-width/border-0border-width/00 px
border-width/border-1border-width/11 px
border-width/border-2border-width/22 px
Last modified on May 11, 2026