You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
caption: A title for the list, e.g. "Sprachnavigation"
description: A descriptive text, e.g. "Die ausgewählte Sprache ist Deutsch"
variant: list (default)|dropdown determines the rendering of the language switch either as a list (used on mobile in the header) or a dropdown (used on desktop in the header)
mode: link (default)|events determines if the language-switch navigates to a different page or just emits events
Slots
post-language-option: Used for displaying the available options
Requirements
Responsive: The language switch should be a menu dropdown on desktop and a horizontal list on mobile
Placement: The placement will be handled by the <post-header> component, so the language switch should expose auto-slot behaviour <post-language-switch slot="post-language-switch">
Proposed markup
List
<!-- Default with links --><post-language-switchvariant=eventstitle=Sprachnavigationdescription="Die aktuelle Sprache ist Deutsch"><post-language-optionactivelang=detitle=Deutschurl="/de">DE</post-language-option></post-language-switch><!-- Event driven with buttons --><post-language-switchvariant=eventstitle=Sprachnavigationdescription="Die aktuelle Sprache ist Deutsch"><post-language-optionactivelang=detitle=Deutsch>DE</post-language-option></post-language-switch><!-- Mobile rendering --><Host><post-list><h3>{this.title}, {this.description}</h3><slot></slot></post-list></Host><!-- Desktop rendering --><Host><post-menu-toggle><button>
{this.title}, {this.description}
</button></post-menu-toggle><post-menu><post-list><h3>{this.title}</h3><slot></slot></post-list></post-menu></Host>
The content you are editing has changed. Please copy your edits and refresh the page.
Create a standalone language switch component. The current implementation (https://github.com/swisspost/design-system/tree/main/packages/internet-header/src/components/post-language-switch) relies on a config file, the new component should be usable without that configuration.
Design
https://www.figma.com/design/JIT5AdGYqv6bDRpfBPV8XR/Foundations-%26-Components-Next-Level?node-id=2908-30439&t=saHtog1amMMrG60S-4
Props
caption
: A title for the list, e.g. "Sprachnavigation"description
: A descriptive text, e.g. "Die ausgewählte Sprache ist Deutsch"variant
:list (default)|dropdown
determines the rendering of the language switch either as a list (used on mobile in the header) or a dropdown (used on desktop in the header)mode
:link (default)|events
determines if the language-switch navigates to a different page or just emits eventsSlots
post-language-option
: Used for displaying the available optionsRequirements
<post-header>
component, so the language switch should expose auto-slot behaviour<post-language-switch slot="post-language-switch">
Proposed markup
List
Tasks
The text was updated successfully, but these errors were encountered: