No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:

  1. Missing Context/Providers: You can use decorators to supply specific contexts or providers, which are sometimes necessary for components to render correctly. For detailed instructions on using decorators, please visit the Decorators documentation.
  2. Misconfigured Webpack or Vite: Verify that Storybook picks up all necessary settings for loaders, plugins, and other relevant parameters. You can find step-by-step guides for configuring Webpack or Vite with Storybook.
  3. Missing Environment Variables: Your Storybook may require specific environment variables to function as intended. You can set up custom environment variables as outlined in the Environment Variables documentation.

This version is no longer actively maintained and has reached End-of-Life (EOL). For new and ongoing projects, please refer to the latest Design System version.

Spacing

Our spacing utility brings uniform and consistent spacing to your elements,

By adhering to standardized spacing guidelines, we maintain visual alignment and improve the overall user interface.

Sizing variables are deprecated

The current set of the post-specific spacing utility is deprecated in favour of a new naming system that is consistent with the Design. For further information, please read the discussion on sizing variables on GitHub and have a look at the implementation in Figma.

There is a new solution with updated naming system up coming for spacing sizes.

You can apply the desired spacings for margin and/or padding all around an element using the classes m-* and p-*, or you can specify a position (e.g. pt-* , pb-* , pe-* , ps-* respectively for a padding at top, bottom, end/right and start/left). You can also set a spacing along the horizontal axis (i.e. right and left) using mx-* / px-* or along the vertical axis (i.e. top and bottom) using my-* / py-* .

Our base spacing classes with suffixes going from 0 to 5 (*-0, *-1, ..., *-5).

Our custom sizes can be used in the same way: by adding the name of the desired size to a prefix. See our sizing docs to find out which size names are available.

Do not use spacing classes on grid elements (i.e. .row, .col, .col-*).

Our grid is built with negative margins and positive paddings on the x-axis. Therefore, use this spacing classes only if you know exactly what you are doing!

  • margin
  • padding
  • content
<div class="w-bigger-giant h-bigger-giant m-regular p-regular"></div>
NameDescriptionDefaultControl
General
Margin size
Sets the size of the Margin.
string
-
Margin Position
Sets the position of the Margin.
string
-
Padding size
Sets the size of the Padding.
string
-
Padding Position
Sets the position of the Padding.
string
-

By default, the above classes apply to all breakpoints.

If you need to change the size or spacing of an element based on the breakpoint, you should mention it in the class name using one of the following infixes: -xs-, -sm-, -rg-, -md-, -lg-, -xl-, -xxl-. When a breakpoint is specified, the size applies to that breakpoint and to all those that are larger.

The square below has a big padding from the large breakpoint (i.e. .p-lg-big) and a regular padding below (i.e. .p-regular).

Resize the browser window to see changes.

Another way to define a responsive size is to use the -r suffix. It allows to obtain a size which updates automatically and consistently depending on the breakpoint, without having to specify anything manually.

The square below has a "large" responsive padding, which means the padding size automatically changes based on the breakpoint but remains visually consistent.

Resize the browser window to see changes.