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.
For longer, informative messages or explanations and also simple interactive elements like links.
next.design-system.post.ch/?path=/docs/9a636763-de2d-4f72-bc81-98daf10871f7--docs&story=Default#9a636763-de2d-4f72-bc81-98daf10871f7--default
/?path=/story/9a636763-de2d-4f72-bc81-98daf10871f7--default&full=true
A longer message that needs more time to read. Links are also possible.
<div class="d-flex justify-content-center"> <button class="btn btn-secondary btn-large" data-popover-target="popover-one"> Click here to see a popover </button> </div> <post-popover class="palette-accent" id="popover-one" placement="top" close-button-caption="Close" arrow="" style="" > <h2 class="h6">Optional title</h2> <p class="mb-0"> A longer message that needs more time to read. <a href="#">Links</a> are also possible. </p> </post-popover>
Name | Description | Default | Control |
---|---|---|---|
General | |||
Id | The id is used to connect a trigger element with the popover. string | - | |
Content | string | - | |
Palette | Define the popover color scheme. HTML class attribute | - | |
Show title | Show an optional title, the heading level can be chosen to match the document structure, use the .h6 class for appropriate styling.boolean | - | |
Max width of the popover | Value can either be in vw , px or % . If no max-width is defined, the popover will extend to the width of its content.string | 280px | |
props | |||
Close button caption* | Define the caption of the close button for assistive technology string | ||
Placement | Defines the position of the popover relative to its trigger. Popovers are automatically flipped to the opposite side if there is not enough available space and are shifted towards the viewport if they would overlap edge boundaries. For supported values and behavior details, see the Floating UI placement documentation. "bottom""bottom-end""bottom-start""left""left-end""left-start""right""right-end" | 'top' | |
Arrow | Show a little indicator arrow boolean | true | |
methods | |||
hide | Programmatically hide this popover hide() => Promise<void> | - | - |
show | Programmatically display the popover show(target: HTMLElement) => Promise<void> | - | - |
toggle | Toggle popover display toggle(target: HTMLElement, force?: boolean) => Promise<void> | - | - |
The <post-popover>
element is part of the @swisspost/design-system-components
package. For more information, read the getting started with components guide.