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:
This is a pre-release version and is not production ready. For new and ongoing projects, please refer to the latest Design System version.
Define the positioning method of an element, as well as its position relative to top, bottom, start and end easily with utility classes.
next.design-system.post.ch/?path=/docs/803a58e8-c734-4ad7-80a8-62da1bb29d4b--docs&story=Default#803a58e8-c734-4ad7-80a8-62da1bb29d4b--default
/?path=/story/803a58e8-c734-4ad7-80a8-62da1bb29d4b--default&full=true
<div class="my-element position-absolute top-0 start-50 translate-middle"></div>
Here are the different positioning methods available for elements.
position-static
(default) positions the element according to the flow of the page.position-relative
positions the element according to the flow of the page, but you can offset it relatively to itself by settings values for top
, bottom
, start
and end
.position-absolute
removes the element from the flow of the page and positions it relatively to its closest positioned element.position-fixed
removes the element from the flow of the page and positions it relatively to the viewport.position-sticky
positions the element according to the flow of the page but "sticks" it in place in the case of a scrolling container.Some utility classes are here to define the position from the edges of the container more easily.
top-{0|50|100}
to set the position of the element from the top of the container by 0, 50% or 100%.bottom-{0|50|100}
to set the position of the element from the bottom of the container by 0, 50% or 100%.start-{0|50|100}
to set the position of the element from the start of the container (left in LTR) by 0, 50% or 100%.end-{0|50|100}
to set the position of the element from the end of the container (right in LTR) by 0, 50% or 100%.The class .translate-middle
is there to center an element horizontally and vertically on their x and y position. You can also use .translate-middle-x
to only center the element horizontally and .translate-middle-y
to center it vertically.
next.design-system.post.ch/?path=/docs/803a58e8-c734-4ad7-80a8-62da1bb29d4b--docs&story=Translate Middle#803a58e8-c734-4ad7-80a8-62da1bb29d4b--translate-middle
/?path=/story/803a58e8-c734-4ad7-80a8-62da1bb29d4b--translate-middle&full=true
On the example above, the black dot is the center of the container. Both squares are positioned 50% from the top and 50% from the start. The blue square has the translate-middle
class and the yellow one doesn't.