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 variable | Aliased token | Value |
|---|
padding/p-2 | spacing/2 | 2 px |
padding/p-4 | spacing/4 | 4 px |
padding/p-6 | spacing/6 | 6 px |
padding/p-8 | spacing/8 | 8 px |
padding/p-12 | spacing/12 | 12 px |
padding/p-14 | spacing/14 | 14 px |
padding/p-16 | spacing/16 | 16 px |
padding/p-20 | spacing/20 | 20 px |
padding/p-24 | spacing/24 | 24 px |
padding/p-28 | spacing/28 | 28 px |
padding/p-32 | spacing/32 | 32 px |
padding/p-36 | spacing/36 | 36 px |
padding/p-40 | spacing/40 | 40 px |
Margin
Applied as top, right, bottom, left margin outside of a component or UI element.
| Utility variable | Aliased token | Value |
|---|
margin/m-4 | spacing/4 | 4 px |
margin/m-6 | spacing/6 | 6 px |
margin/m-8 | spacing/8 | 8 px |
margin/m-12 | spacing/12 | 12 px |
margin/m-16 | spacing/16 | 16 px |
margin/m-20 | spacing/20 | 20 px |
margin/m-24 | spacing/24 | 24 px |
margin/m-28 | spacing/28 | 28 px |
margin/m-32 | spacing/32 | 32 px |
margin/m-36 | spacing/36 | 36 px |
margin/m-40 | spacing/40 | 40 px |
margin/m-44 | spacing/44 | 44 px |
margin/m-48 | spacing/48 | 48 px |
margin/m-52 | spacing/52 | 52 px |
margin/m-56 | spacing/56 | 56 px |
margin/m-60 | spacing/60 | 60 px |
margin/m-64 | spacing/64 | 64 px |
margin/m-68 | spacing/68 | 68 px |
margin/m-72 | spacing/72 | 72 px |
margin/m-76 | spacing/76 | 76 px |
margin/m-80 | spacing/80 | 80 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 variable | Aliased token | Value |
|---|
width/w-4 | spacing/4 | 4 px |
width/w-8 | spacing/8 | 8 px |
width/w-16 | spacing/16 | 16 px |
width/w-20 | spacing/20 | 20 px |
width/w-24 | spacing/24 | 24 px |
width/w-28 | spacing/28 | 28 px |
width/w-32 | spacing/32 | 32 px |
width/w-36 | spacing/36 | 36 px |
width/w-40 | spacing/40 | 40 px |
width/w-44 | spacing/44 | 44 px |
width/w-48 | spacing/48 | 48 px |
Min-width
Applied when a min width is set to a component or container, e.g., Dialog.
| Utility variable | Aliased token | Value |
|---|
min-width/min-w-4 | spacing/4 | 4 px |
min-width/min-w-8 | spacing/8 | 8 px |
min-width/min-w-16 | spacing/16 | 16 px |
min-width/min-w-20 | spacing/20 | 20 px |
min-width/min-w-24 | spacing/24 | 24 px |
min-width/min-w-28 | spacing/28 | 28 px |
min-width/min-w-32 | spacing/32 | 32 px |
min-width/min-w-36 | spacing/36 | 36 px |
min-width/min-w-40 | spacing/40 | 40 px |
min-width/min-w-44 | spacing/44 | 44 px |
min-width/min-w-48 | spacing/48 | 48 px |
Max-width
Applied when a max width is set to a component or container, e.g., Dialog.
| Utility variable | Aliased token | Value |
|---|
max-width/max-w-4 | spacing/4 | 4 px |
max-width/max-w-8 | spacing/8 | 8 px |
max-width/max-w-16 | spacing/16 | 16 px |
max-width/max-w-20 | spacing/20 | 20 px |
max-width/max-w-24 | spacing/24 | 24 px |
max-width/max-w-28 | spacing/28 | 28 px |
max-width/max-w-32 | spacing/32 | 32 px |
max-width/max-w-36 | spacing/36 | 36 px |
max-width/max-w-40 | spacing/40 | 40 px |
max-width/max-w-44 | spacing/44 | 44 px |
max-width/max-w-48 | spacing/48 | 48 px |
max-width/max-w-52 | spacing/52 | 52 px |
max-width/max-w-56 | spacing/56 | 56 px |
max-width/max-w-60 | spacing/60 | 60 px |
max-width/max-w-64 | spacing/64 | 64 px |
max-width/max-w-68 | spacing/68 | 68 px |
max-width/max-w-72 | spacing/72 | 72 px |
max-width/max-w-76 | spacing/76 | 76 px |
max-width/max-w-80 | spacing/80 | 80 px |
max-width/max-w-84 | spacing/84 | 84 px |
max-width/max-w-88 | spacing/88 | 88 px |
max-width/max-w-92 | spacing/92 | 92 px |
max-width/max-w-96 | spacing/96 | 96 px |
max-width/max-w-100 | spacing/100 | 100 px |
Height
Applied as a fixed height to a component, e.g., Button.
| Utility variable | Aliased token | Value |
|---|
height/h-4 | spacing/4 | 4 px |
height/h-8 | spacing/8 | 8 px |
height/h-16 | spacing/16 | 16 px |
height/h-20 | spacing/20 | 20 px |
height/h-24 | spacing/24 | 24 px |
height/h-28 | spacing/28 | 28 px |
height/h-32 | spacing/32 | 32 px |
height/h-36 | spacing/36 | 36 px |
height/h-40 | spacing/40 | 40 px |
height/h-44 | spacing/44 | 44 px |
height/h-48 | spacing/48 | 48 px |
Min-height
Applied when a min height is set to a component or container, e.g., Textarea.
| Utility variable | Aliased token | Value |
|---|
min-height/min-h-4 | spacing/4 | 4 px |
min-height/min-h-8 | spacing/8 | 8 px |
min-height/min-h-16 | spacing/16 | 16 px |
min-height/min-h-20 | spacing/20 | 20 px |
min-height/min-h-24 | spacing/24 | 24 px |
min-height/min-h-28 | spacing/28 | 28 px |
min-height/min-h-32 | spacing/32 | 32 px |
min-height/min-h-36 | spacing/36 | 36 px |
min-height/min-h-40 | spacing/40 | 40 px |
min-height/min-h-44 | spacing/44 | 44 px |
min-height/min-h-48 | spacing/48 | 48 px |
Max-height
Applied when a max height is set to a component or container, e.g., Textarea.
| Utility variable | Aliased token | Value |
|---|
max-height/max-h-4 | spacing/4 | 4 px |
max-height/max-h-8 | spacing/8 | 8 px |
max-height/max-h-16 | spacing/16 | 16 px |
max-height/max-h-20 | spacing/20 | 20 px |
max-height/max-h-24 | spacing/24 | 24 px |
max-height/max-h-28 | spacing/28 | 28 px |
max-height/max-h-32 | spacing/32 | 32 px |
max-height/max-h-36 | spacing/36 | 36 px |
max-height/max-h-40 | spacing/40 | 40 px |
max-height/max-h-44 | spacing/44 | 44 px |
max-height/max-h-48 | spacing/48 | 48 px |
max-height/max-h-52 | spacing/52 | 52 px |
max-height/max-h-56 | spacing/56 | 56 px |
max-height/max-h-60 | spacing/60 | 60 px |
max-height/max-h-64 | spacing/64 | 64 px |
max-height/max-h-68 | spacing/68 | 68 px |
max-height/max-h-72 | spacing/72 | 72 px |
max-height/max-h-76 | spacing/76 | 76 px |
max-height/max-h-80 | spacing/80 | 80 px |
max-height/max-h-84 | spacing/84 | 84 px |
max-height/max-h-88 | spacing/88 | 88 px |
max-height/max-h-92 | spacing/92 | 92 px |
max-height/max-h-96 | spacing/96 | 96 px |
max-height/max-h-100 | spacing/100 | 100 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 variable | Aliased token | Value |
|---|
border/rounded-none | radius/none | 0 px |
border/rounded-xs | radius/xs | 2 px |
border/rounded-sm | radius/sm | 4 px |
border/rounded-md | radius/md | 6 px |
border/rounded-lg | radius/lg | 8 px |
border/rounded-xl | radius/xl | 12 px |
border/rounded-2xl | radius/2xl | 16 px |
border/rounded-3xl | radius/3xl | 24 px |
border/rounded-4xl | radius/4xl | 32 px |
border/rounded-full | radius/full | 9999 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 variable | Aliased token | Value |
|---|
border-width/border-0 | border-width/0 | 0 px |
border-width/border-1 | border-width/1 | 1 px |
border-width/border-2 | border-width/2 | 2 px |