If you answer yes, we store and analyse information that helps us improve the website. You can change your choice at any time at the bottom of the page. More about what we store and why.

We also store necessary information that cannot be opted out of. This makes the website work and keeps it secure.

Skip to main content

What are you looking for?

Try searching for…

Getting started

Sizes and Spacing

How sizes and spacing are defined and used in Designsystemet.

Updated November 15, 2026

Component Sizes

Most components in Designsystemet come in three recommended sizes: Small, Medium, and Large (sm, md, lg). These are developed to adapt to different needs across screen sizes and use cases.

Small
Medium
Large
Sizes for components in Designsystemet.

Small is ideal for compact interfaces where space utilization is important, such as on mobile devices, expert tools, or administrative interfaces. Body text is 16px in this size.

Medium is the default and suits most common use cases. Body text is 18px in this size. This size provides a good balance between readability and space utilization and is particularly well-suited for desktop interfaces and larger display surfaces.

Large provides increased readability and clarity. It can be used in desktop interfaces or when visibility and accessibility are important. It can also be used in a defined context on the page to highlight key elements. Body text is 21px in this size.

You choose a size with the data-size attribute. The size applies to the element and everything inside it, and changes the text size, the components and the spacing. Without data-size, Medium is used.

The pixel values on this page apply to the default theme values and the browser's default font size (16px). The sizes are calculated in rem, so they follow the font size the user has chosen.

Example with Medium components
Many of the medium components have the same height.

Components within a specific size are designed to work together. For example, many medium components have a minimum height of 48px and 18px text, which ensures a harmonious visual balance when placed next to each other.

  • Medium
  • Large
Example where Medium and Large components are used together.

To maintain a coherent and clear design, it is recommended to use fixed sizes within a given website or context. Many different combinations of sizes can lead to a cluttered and confusing design.

In some cases, components of different sizes can be combined to create better visual hierarchies and user-friendliness. In the example above, the search field section is larger and more prominent than the components in the header, because the search function is a central part of the page. The increased size makes it more visible and easily accessible to the user.

Edit this page on github.com (opens in a new tab)