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.

The topic teaser is deprecated and will be removed in a future version.

Topic Teaser provides a flexible and responsive content container with options to align the image, adding topic content and links as well as contextual background colors.

If you use multiple topic teasers on one page, each topic teaser must have a different background.

<div class="topic-teaser mb-huge-r bg-nightblue"> <div class="container"> <div class="topic-teaser-container bg-nightblue"> <div class="row pt-huge-r"> <div class="topic-teaser-content"> <h2 class="topic-teaser-title font-curve-large mb-large"> <span class="bold">Loremipsum</span> <span class="light">Vero siteos et accusam iretea et justo</span> </h2> <ul class="link-list mb-large"> <li class="link-list-item"> <a href="#"> <span>At vero eos et accusam et</span> </a> </li> <li class="link-list-item"> <a href="#"> <span>Dolores et ea rebum</span> </a> </li> <li class="link-list-item"> <a href="#"> <span>Stet clita kasd gubergren</span> </a> </li> <li class="link-list-item"> <a href="#"> <span>Sed diam nonumy eirmod</span> </a> </li> <li class="link-list-item"> <a href="#"> <span>Duo dolores et ea rebum</span> </a> </li> </ul> </div> <div class="topic-teaser-image-container"> <img class="topic-teaser-image" src="https://picsum.photos/id/553/800/800" width="100%" height="100%" alt="" /> </div> </div> </div> </div> </div>
NameDescriptionDefaultControl
General
Title
The text to include in the component title.
string
-
Subtitle
The text to include in the component subtitle.
string
-
Amount of links
The amount of the renderd links.
number
-
Image alignment
The alignment of the image.
string
-
Background Color
The color the component uses as background.
string
-

Make sure the @swisspost/design-system-styles package is already present in your project or follow the installation guidelines.

To import all Design System styles:

@use '@swisspost/design-system-styles/index.scss';

To import only the styles required for this component:

@use '@swisspost/design-system-styles/basics.scss'; @use '@swisspost/design-system-styles/components/topic-teaser.scss';