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.
The language option switch is a web component which enables users to select their preferred language.
next.design-system.post.ch/?path=/docs/decbb10c-2b39-4f47-b67d-337d8111a3ae--docs&story=Default#decbb10c-2b39-4f47-b67d-337d8111a3ae--default
/?path=/story/decbb10c-2b39-4f47-b67d-337d8111a3ae--default&full=true
<post-language-switch caption="Change the language" description="The currently selected language is English." variant="list" type="language" > <post-language-option active="false" code="de" name="Deutsch">de</post-language-option> <post-language-option active="true" code="en" name="English">en</post-language-option> <post-language-option active="false" code="fr" name="French">fr</post-language-option> </post-language-switch>
Name | Description | Default | Control |
---|---|---|---|
type | string | - | |
props | |||
variant | Whether the component is rendered as a list or a menu "list""menu" | 'list' | |
caption* | A title for the list of language options string | ||
description* | A descriptive text for the list of language options string |
The <post-language-switch>
element is part of the @swisspost/design-system-components
package.
For more information, read the getting started with components guide.
The language options can be used as links, which will navigate to a different page upon selection.
<post-language-switch variant="menu" caption="Change the language" description="The currently selected language is English." > <post-language-option url="/de" active="false" code="de" name="Deutsch">DE</post-language-option> <post-language-option url="/en" active="true" code="en" name="English">EN</post-language-option> <post-language-option url="/fr" active="false" code="fr" name="French">FR</post-language-option> </post-language-switch>