@porsche-design-system/components-react 4.8.0-rc.0 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,250 @@
1
+ # Footer
2
+
3
+ The footer serves as a universal navigation and information hub located at the bottom of every page. It provides essential links, copyright information, legal disclaimers, and contact details, ensuring users can easily access key information regardless of their location on the site.
4
+
5
+ - **Type:** Pattern
6
+ - **Components:** [`p-flag`](../../components/p-flag/p-flag.md), [`p-heading`](../../components/p-heading/p-heading.md), [`p-link-pure`](../../components/p-link-pure/p-link-pure.md), [`p-select`](../../components/p-select/p-select.md), [`p-text`](../../components/p-text/p-text.md), [`p-wordmark`](../../components/p-wordmark/p-wordmark.md)
7
+ - **Conventions and stylesheet:** shared by all examples, see [examples.md](../../examples.md)
8
+
9
+ ## Markup
10
+
11
+ ```html
12
+ <html lang="en">
13
+ <body>
14
+ <main id="main"></main>
15
+ <footer class="grid-template py-fluid-lg bg-surface">
16
+ <form
17
+ class="col-extended grid xs:grid-cols-2 md:grid-cols-3 gap-fluid-md"
18
+ action="#"
19
+ aria-label="Change your delivery country"
20
+ >
21
+ <p-select name="region" value="de" label="Change your delivery country">
22
+ <span slot="selected" class="h-full flex items-center gap-fluid-sm grow">
23
+ <p-flag name="de"></p-flag>
24
+ Germany
25
+ </span>
26
+ <p-optgroup label="Asia">
27
+ <p-select-option value="cn">
28
+ <p-flag name="cn"></p-flag>
29
+ China
30
+ </p-select-option>
31
+ <p-select-option value="jp">
32
+ <p-flag name="jp"></p-flag>
33
+ Japan
34
+ </p-select-option>
35
+ <p-select-option value="kr">
36
+ <p-flag name="kr"></p-flag>
37
+ South Korea
38
+ </p-select-option>
39
+ </p-optgroup>
40
+ <p-optgroup label="Europe">
41
+ <p-select-option value="at">
42
+ <p-flag name="at"></p-flag>
43
+ Austria
44
+ </p-select-option>
45
+ <p-select-option value="fr">
46
+ <p-flag name="fr"></p-flag>
47
+ France
48
+ </p-select-option>
49
+ <p-select-option value="de">
50
+ <p-flag name="de"></p-flag>
51
+ Germany
52
+ </p-select-option>
53
+ <p-select-option value="gb">
54
+ <p-flag name="gb"></p-flag>
55
+ Great Britain
56
+ </p-select-option>
57
+ <p-select-option value="it">
58
+ <p-flag name="it"></p-flag>
59
+ Italy
60
+ </p-select-option>
61
+ <p-select-option value="pt">
62
+ <p-flag name="pt"></p-flag>
63
+ Portugal
64
+ </p-select-option>
65
+ <p-select-option value="es">
66
+ <p-flag name="es"></p-flag>
67
+ Spain
68
+ </p-select-option>
69
+ </p-optgroup>
70
+ <p-optgroup label="North America">
71
+ <p-select-option value="ca">
72
+ <p-flag name="ca"></p-flag>
73
+ Canada
74
+ </p-select-option>
75
+ <p-select-option value="us">
76
+ <p-flag name="us"></p-flag>
77
+ USA
78
+ </p-select-option>
79
+ </p-optgroup>
80
+ </p-select>
81
+ </form>
82
+ <nav
83
+ class="col-extended grid xs:grid-cols-2 md:grid-cols-3 gap-x-fluid-md gap-y-fluid-lg mt-fluid-sm mb-fluid-lg"
84
+ aria-label="Footer"
85
+ >
86
+ <div class="flex flex-col gap-fluid-sm">
87
+ <p-heading id="heading-footer-1" tag="h3" size="2xs" color="contrast-medium">Legal Services</p-heading>
88
+ <ul class="grid gap-fluid-sm">
89
+ <li>
90
+ <p-link-pure icon="none"><a href="#">Terms and Conditions</a></p-link-pure>
91
+ </li>
92
+ <li>
93
+ <p-link-pure icon="none"><a href="#">Privacy Notice</a></p-link-pure>
94
+ </li>
95
+ <li>
96
+ <p-link-pure icon="none"><a href="#">California Privacy</a></p-link-pure>
97
+ </li>
98
+ <li>
99
+ <p-link-pure icon="none"><a href="#">Imprint and Legal Notice</a></p-link-pure>
100
+ </li>
101
+ <li>
102
+ <p-link-pure icon="none"><a href="#">Accessibility Statement</a></p-link-pure>
103
+ </li>
104
+ <li>
105
+ <p-link-pure icon="none"><a href="#">Open Source Software Notice</a></p-link-pure>
106
+ </li>
107
+ </ul>
108
+ </div>
109
+ <div class="flex flex-col gap-fluid-sm">
110
+ <p-heading tag="h3" size="2xs" color="contrast-medium">Porsche Design</p-heading>
111
+ <ul class="grid gap-fluid-sm">
112
+ <li>
113
+ <p-link-pure icon="none"><a href="#">Press</a></p-link-pure>
114
+ </li>
115
+ <li>
116
+ <p-link-pure icon="none"><a href="#">Jobs and Careers</a></p-link-pure>
117
+ </li>
118
+ <li>
119
+ <p-link-pure icon="none"><a href="#">Studio F. A. Porsche</a></p-link-pure>
120
+ </li>
121
+ <li>
122
+ <p-link-pure icon="none"><a href="#">Data Privacy</a></p-link-pure>
123
+ </li>
124
+ <li>
125
+ <p-link-pure icon="none"><a href="#">Timepieces Warranty &amp; Service</a></p-link-pure>
126
+ </li>
127
+ </ul>
128
+ </div>
129
+ <div class="flex flex-col gap-fluid-sm">
130
+ <p-heading tag="h3" size="2xs" color="contrast-medium">Online Services</p-heading>
131
+ <ul class="grid gap-fluid-sm">
132
+ <li>
133
+ <p-link-pure icon="none"><a href="#">My Orders</a></p-link-pure>
134
+ </li>
135
+ <li>
136
+ <p-link-pure icon="none"><a href="#">Porsche Homepage</a></p-link-pure>
137
+ </li>
138
+ <li>
139
+ <p-link-pure icon="none"><a href="#">Porsche Car Configurator</a></p-link-pure>
140
+ </li>
141
+ <li>
142
+ <p-link-pure icon="none"><a href="#">Porsche New and Pre-Owned Vehicles</a></p-link-pure>
143
+ </li>
144
+ <li>
145
+ <p-link-pure icon="none"><a href="#">Compare Porsche models</a></p-link-pure>
146
+ </li>
147
+ </ul>
148
+ </div>
149
+ </nav>
150
+ <article
151
+ class="col-extended grid sm:grid-cols-[auto_minmax(0,1fr)] items-center gap-x-fluid-lg gap-y-static-lg"
152
+ aria-label="Social media and payment service providers"
153
+ >
154
+ <div class="flex gap-fluid-md">
155
+ <p-link-pure class="p-static-sm -m-static-sm" icon="logo-instagram" hide-label="true" size="md">
156
+ <a href="#">Instagram</a>
157
+ </p-link-pure>
158
+ <p-link-pure class="p-static-sm -m-static-sm" icon="logo-facebook" hide-label="true" size="md">
159
+ <a href="#">Facebook</a>
160
+ </p-link-pure>
161
+ <p-link-pure class="p-static-sm -m-static-sm" icon="logo-x" hide-label="true" size="md">
162
+ <a href="#">X</a>
163
+ </p-link-pure>
164
+ <p-link-pure class="p-static-sm -m-static-sm" icon="logo-pinterest" hide-label="true" size="md">
165
+ <a href="#">Pinterest</a>
166
+ </p-link-pure>
167
+ <p-link-pure class="p-static-sm -m-static-sm" icon="logo-youtube" hide-label="true" size="md">
168
+ <a href="#">YouTube</a>
169
+ </p-link-pure>
170
+ </div>
171
+ <div class="flex gap-fluid-xs">
172
+ <a class="focus-visible:outline outline-focus outline-offset-2 rounded-sm" href="#">
173
+ <img
174
+ src="https://images.ctfassets.net/1oyzmkwpf3d5/hskK1tzN0CS8cdGIttugu/883187acee1c66e7d4593141f3e659c3/Visa.svg"
175
+ alt="visa logo"
176
+ />
177
+ </a>
178
+ <a class="focus-visible:outline outline-focus outline-offset-2 rounded-sm" href="#">
179
+ <img
180
+ src="https://images.ctfassets.net/1oyzmkwpf3d5/34g5LXmVhTzseATJL7CLFj/501eba81ff4787357277faff4ea04f4d/Master__1_.svg"
181
+ alt="master card logo"
182
+ />
183
+ </a>
184
+ <a class="focus-visible:outline outline-focus outline-offset-2 rounded-sm" href="#">
185
+ <img
186
+ src="https://images.ctfassets.net/1oyzmkwpf3d5/4NeGQiGeYT5VZ3G591li1k/c12d0cc589f608a6db3d3e7d2aae0255/PayPal.svg"
187
+ alt="paypal logo"
188
+ />
189
+ </a>
190
+ </div>
191
+ </article>
192
+ <article class="col-extended grid gap-fluid-md mt-fluid-md" aria-label="Consumption and emission information">
193
+ <p-text size="2xs" color="contrast-medium">
194
+ The consumption and emission values stated were determined in accordance with the legally prescribed
195
+ measurement procedures. Since September 1, 2017, certain new vehicles have been type-approved in accordance
196
+ with the Worldwide Harmonized Vehicles Test Procedure (WLTP), a more realistic test procedure for measuring
197
+ fuel/electricity consumption and CO₂ emissions. Since September 1, 2018, the WLTP has replaced the New
198
+ European Driving Cycle (NEDC). Due to the more realistic testing conditions, the fuel/electricity consumption
199
+ and CO₂ emission values measured according to the WLTP are, in many cases, higher than those measured
200
+ according to the NEDC. As a result, vehicle taxation may change accordingly starting September 1, 2018.
201
+ Further information on the differences between WLTP and NEDC can be found at www.porsche.com/wltp.
202
+ </p-text>
203
+ <p-text size="2xs" color="contrast-medium">
204
+ Currently, regardless of the applied type-approval procedure, it remains mandatory to communicate NEDC values.
205
+ The additional disclosure of WLTP values may be done on a voluntary basis until their mandatory use. In the
206
+ case of new vehicles type-approved according to WLTP, NEDC values are derived from WLTP values and stated
207
+ during the transitional period. Where NEDC values are stated as ranges, they do not refer to a specific
208
+ individual vehicle and are not part of the offer. They serve solely for comparison purposes between different
209
+ vehicle types. Optional equipment and accessories (attachments, tire formats, etc.) can alter relevant vehicle
210
+ parameters such as weight, rolling resistance, and aerodynamics, and can influence fuel/electricity
211
+ consumption, CO₂ emissions, and performance values of a vehicle in addition to weather and traffic conditions
212
+ and individual driving behavior. Further information on the official fuel/electricity consumption and official
213
+ specific CO₂ emissions of new passenger cars can be found in the &quot;Guide on fuel consumption, CO₂
214
+ emissions and electricity consumption of new passenger cars,&quot; available free of charge at all sales
215
+ outlets and from DAT.
216
+ </p-text>
217
+ <p-text size="2xs" color="contrast-medium">
218
+ Neither the number of active users of this Porsche Connect Store nor the number of active users of the App
219
+ Center available in the connected vehicle (Macan electric) upon activation of the Connect services exceeds the
220
+ threshold of 45 million active users in the European Union as defined by the Digital Services Act (DSA).
221
+ Important information regarding fully electric Porsche models can be found here.
222
+ </p-text>
223
+ </article>
224
+ <div class="col-extended grid gap-fluid-md justify-items-center mt-fluid-md">
225
+ <p-wordmark></p-wordmark>
226
+ <p-text size="2xs" color="contrast-medium">© 2026 Porsche Sales and Marketplace, Inc.</p-text>
227
+ <ul class="flex flex-wrap justify-center gap-fluid-md">
228
+ <li>
229
+ <p-link-pure icon="none" size="xs" underline><a href="#">Legal notice</a></p-link-pure>
230
+ </li>
231
+ <li>
232
+ <p-link-pure icon="none" size="xs" underline><a href="#">Privacy notice</a></p-link-pure>
233
+ </li>
234
+ <li>
235
+ <p-link-pure icon="none" size="xs" underline><a href="#">Accessibility Statement</a></p-link-pure>
236
+ </li>
237
+ <li>
238
+ <p-link-pure icon="none" size="xs" underline><a href="#">Open Source Software Notice</a></p-link-pure>
239
+ </li>
240
+ </ul>
241
+ </div>
242
+ </footer>
243
+ <script type="module" src="main.js"></script>
244
+ </body>
245
+ </html>
246
+ ```
247
+
248
+ ## Script
249
+
250
+ None – the components cover all of the behaviour.
@@ -0,0 +1,152 @@
1
+ # Header: Overlay
2
+
3
+ The header lies on top of the content, typically a full-bleed hero image or video, and is reduced to a single row with brand, navigation and meta actions. The menu opens a drilldown with the site navigation.
4
+
5
+ - **Type:** Pattern
6
+ - **Components:** [`p-button`](../../../components/p-button/p-button.md), [`p-button-pure`](../../../components/p-button-pure/p-button-pure.md), [`p-crest`](../../../components/p-crest/p-crest.md), [`p-drilldown`](../../../components/p-drilldown/p-drilldown.md), [`p-heading`](../../../components/p-heading/p-heading.md), [`p-wordmark`](../../../components/p-wordmark/p-wordmark.md)
7
+ - **Conventions and stylesheet:** shared by all examples, see [examples.md](../../../examples.md)
8
+
9
+ ## Markup
10
+
11
+ ```html
12
+ <html lang="en">
13
+ <body>
14
+ <header
15
+ class="z-1 grid-template absolute inset-x-0 before:absolute before:inset-[0_0_-60px_0] before:-z-1 before:pointer-events-none before:bg-fade-to-b"
16
+ >
17
+ <div class="col-wide grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] gap-fluid-md items-center min-h-[80px]">
18
+ <div class="flex flex-wrap gap-static-md items-center justify-start">
19
+ <nav aria-label="Main">
20
+ <p-button-pure
21
+ id="nav-button"
22
+ class="p-static-xs -m-static-xs scheme-dark"
23
+ type="button"
24
+ icon="menu-lines"
25
+ hide-label="{ base: true, s: false }"
26
+ aria="{ 'aria-haspopup': 'dialog' }"
27
+ >
28
+ Menu
29
+ </p-button-pure>
30
+ <p-drilldown id="nav-drilldown">
31
+ <p-drilldown-item identifier="home" label="Home">
32
+ <p-drilldown-link active><a href="#" aria-current="page">Home overview</a></p-drilldown-link>
33
+ <p-drilldown-link><a href="#">Highlights</a></p-drilldown-link>
34
+ <p-drilldown-item identifier="home-models" label="Models">
35
+ <p-drilldown-link><a href="#">Models overview</a></p-drilldown-link>
36
+ <p-drilldown-link><a href="#">911</a></p-drilldown-link>
37
+ <p-drilldown-link><a href="#">Taycan</a></p-drilldown-link>
38
+ </p-drilldown-item>
39
+ </p-drilldown-item>
40
+ <p-drilldown-item identifier="features" label="Features">
41
+ <p-drilldown-link><a href="#">Features overview</a></p-drilldown-link>
42
+ <p-drilldown-link><a href="#">Design</a></p-drilldown-link>
43
+ <p-drilldown-link><a href="#">Technology</a></p-drilldown-link>
44
+ </p-drilldown-item>
45
+ <p-drilldown-link><a href="#">Contact</a></p-drilldown-link>
46
+ </p-drilldown>
47
+ </nav>
48
+ </div>
49
+ <p-crest class="sm:hidden scheme-dark" href="#"></p-crest>
50
+ <p-wordmark class="max-sm:hidden scheme-dark" href="#"></p-wordmark>
51
+ <div class="flex flex-wrap gap-static-md items-center justify-end">
52
+ <p-button-pure class="p-static-xs -m-static-xs scheme-dark" type="button" icon="search" hide-label="true">
53
+ Search
54
+ </p-button-pure>
55
+ <p-button-pure class="p-static-xs -m-static-xs scheme-dark" type="button" icon="user" hide-label="true">
56
+ User
57
+ </p-button-pure>
58
+ </div>
59
+ </div>
60
+ </header>
61
+ <main id="main" class="grid-template">
62
+ <section class="scheme-dark z-0 col-full grid grid-cols-subgrid items-end h-[clamp(480px,80vh,1000px)]">
63
+ <video
64
+ id="hero-video"
65
+ class="z-0 col-span-full row-span-full min-w-full w-full min-h-full h-full object-cover object-center"
66
+ poster="/examples/media/mood-porsche-gts.webp"
67
+ loop
68
+ muted
69
+ autoplay
70
+ playsinline
71
+ >
72
+ <source src="/examples/media/mood-porsche-gts.mp4" type="video/mp4" />
73
+ <source src="/examples/media/mood-porsche-gts.webm" type="video/webm" />
74
+ </video>
75
+ <div class="z-1 col-extended row-span-full mb-fluid-lg">
76
+ <p-heading tag="h1" size="3xl">
77
+ <span class="text-md block">Pattern</span>
78
+ Header
79
+ </p-heading>
80
+ </div>
81
+ <p-button
82
+ class="z-2 col-wide place-self-end row-span-full mb-fluid-lg"
83
+ variant="secondary"
84
+ compact="true"
85
+ hide-label="true"
86
+ icon="pause"
87
+ id="pause-button"
88
+ >
89
+ Pause Video
90
+ </p-button>
91
+ </section>
92
+ </main>
93
+ <script type="module" src="main.js"></script>
94
+ </body>
95
+ </html>
96
+ ```
97
+
98
+ ## Script
99
+
100
+ ```js
101
+ // DO NOT USE IN PRODUCTION!
102
+ // EXAMPLE CODE FOR DEMONSTRATION PURPOSE ONLY.
103
+
104
+ // Behaviour of the header navigation: the menu button opens the drilldown, and the drilldown reports the level
105
+ // the user drilled into.
106
+
107
+ const navButton = document.getElementById('nav-button');
108
+ const navDrilldown = document.getElementById('nav-drilldown');
109
+
110
+ navButton.addEventListener('click', () => {
111
+ navDrilldown.open = true;
112
+ });
113
+
114
+ // Closing is requested by the component (Escape, the close button, a click on the backdrop) – the open state is
115
+ // owned by the page, so it has to be written back.
116
+ navDrilldown.addEventListener('dismiss', (e) => {
117
+ e.target.open = false;
118
+ });
119
+
120
+ navDrilldown.addEventListener('update', (e) => {
121
+ e.target.activeIdentifier = e.detail.activeIdentifier;
122
+ });
123
+
124
+ // Behaviour of the hero video: a pause control that follows the actual state of the video.
125
+
126
+ const video = document.getElementById('hero-video');
127
+ const pauseButton = document.getElementById('pause-button');
128
+
129
+ // The button hides its label, so its text content is its accessible name – it has to follow the actual state of
130
+ // the video, not the last click. Deriving it from the media events also covers autoplay being refused by the
131
+ // browser.
132
+ const syncPauseButton = () => {
133
+ pauseButton.textContent = video.paused ? 'Play Video' : 'Pause Video';
134
+ pauseButton.icon = video.paused ? 'play' : 'pause';
135
+ };
136
+
137
+ video.addEventListener('play', syncPauseButton);
138
+ video.addEventListener('pause', syncPauseButton);
139
+
140
+ pauseButton.addEventListener('click', () => {
141
+ video[video.paused ? 'play' : 'pause']();
142
+ });
143
+
144
+ // WCAG 2.2: an animation that starts on its own must be stoppable – and it must not start at all when the
145
+ // operating system was asked for reduced motion.
146
+ if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
147
+ video.autoplay = false;
148
+ video.pause();
149
+ }
150
+
151
+ syncPauseButton();
152
+ ```
@@ -0,0 +1,122 @@
1
+ # Header: Stacked
2
+
3
+ The header sits above the content instead of lying on top of it: a note on top, the bar with brand, navigation and meta actions in the middle, and a row of category navigation below. The menu opens a drilldown with the site navigation.
4
+
5
+ - **Type:** Pattern
6
+ - **Components:** [`p-button-pure`](../../../components/p-button-pure/p-button-pure.md), [`p-crest`](../../../components/p-crest/p-crest.md), [`p-drilldown`](../../../components/p-drilldown/p-drilldown.md), [`p-heading`](../../../components/p-heading/p-heading.md), [`p-link-pure`](../../../components/p-link-pure/p-link-pure.md), [`p-tabs-bar`](../../../components/p-tabs-bar/p-tabs-bar.md), [`p-text`](../../../components/p-text/p-text.md), [`p-wordmark`](../../../components/p-wordmark/p-wordmark.md)
7
+ - **Conventions and stylesheet:** shared by all examples, see [examples.md](../../../examples.md)
8
+
9
+ ## Markup
10
+
11
+ ```html
12
+ <html lang="en">
13
+ <body>
14
+ <header class="grid-template gap-y-0">
15
+ <div class="scheme-dark col-full flex justify-center py-static-xs px-static-md bg-surface">
16
+ <p-text size="xs">All sizes shown for Porsche Lifestyle products are EU sizes</p-text>
17
+ </div>
18
+ <div class="col-wide grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] gap-fluid-md items-center min-h-[80px]">
19
+ <div class="flex flex-wrap gap-static-md items-center justify-start">
20
+ <nav aria-label="Main">
21
+ <p-button-pure
22
+ id="nav-button"
23
+ class="p-static-xs -m-static-xs"
24
+ type="button"
25
+ icon="menu-lines"
26
+ hide-label="{ base: true, s: false }"
27
+ aria="{ 'aria-haspopup': 'dialog' }"
28
+ >
29
+ Menu
30
+ </p-button-pure>
31
+ <p-drilldown id="nav-drilldown">
32
+ <p-drilldown-item identifier="home" label="Home">
33
+ <p-drilldown-link><a href="#">Home overview</a></p-drilldown-link>
34
+ <p-drilldown-link><a href="#">Highlights</a></p-drilldown-link>
35
+ <p-drilldown-item identifier="home-models" label="Models">
36
+ <p-drilldown-link><a href="#">Models overview</a></p-drilldown-link>
37
+ <p-drilldown-link><a href="#">911</a></p-drilldown-link>
38
+ <p-drilldown-link><a href="#">Taycan</a></p-drilldown-link>
39
+ </p-drilldown-item>
40
+ </p-drilldown-item>
41
+ <p-drilldown-item identifier="features" label="Features">
42
+ <p-drilldown-link active><a href="#" aria-current="page">Features overview</a></p-drilldown-link>
43
+ <p-drilldown-link><a href="#">Design</a></p-drilldown-link>
44
+ <p-drilldown-link><a href="#">Technology</a></p-drilldown-link>
45
+ </p-drilldown-item>
46
+ <p-drilldown-link><a href="#">Contact</a></p-drilldown-link>
47
+ <p-drilldown-link><a href="#">Stories</a></p-drilldown-link>
48
+ </p-drilldown>
49
+ </nav>
50
+ </div>
51
+ <p-crest class="sm:hidden" href="#"></p-crest>
52
+ <p-wordmark class="max-sm:hidden" href="#"></p-wordmark>
53
+ <div class="flex flex-wrap gap-static-md items-center justify-end">
54
+ <p-button-pure class="p-static-xs -m-static-xs" type="button" icon="search" hide-label="true">
55
+ Search
56
+ </p-button-pure>
57
+ <p-link-pure class="p-static-xs -m-static-xs" href="#" icon="heart" hide-label="true">Favorites</p-link-pure>
58
+ <p-link-pure class="p-static-xs -m-static-xs" href="#" icon="shopping-cart" hide-label="true">
59
+ Shopping Cart
60
+ </p-link-pure>
61
+ <p-button-pure class="p-static-xs -m-static-xs" type="button" icon="user" hide-label="true">
62
+ User
63
+ </p-button-pure>
64
+ </div>
65
+ </div>
66
+ <nav class="col-full flex justify-center p-static-md border-t-thin border-contrast-low" aria-label="Categories">
67
+ <p-tabs-bar compact>
68
+ <a href="#">All categories</a>
69
+ <a href="#">Timepieces</a>
70
+ <a href="#">Bags &amp; Luggage</a>
71
+ <a href="#">Heritage</a>
72
+ <a href="#">Vehicle Accessories</a>
73
+ <a href="#">Eyewear</a>
74
+ </p-tabs-bar>
75
+ </nav>
76
+ </header>
77
+ <main id="main" class="grid-template">
78
+ <section class="scheme-dark col-full grid grid-cols-subgrid items-end h-[clamp(480px,80vh,1000px)]">
79
+ <img
80
+ class="col-span-full row-span-full min-w-full w-full min-h-full h-full object-cover object-center"
81
+ src="/examples/media/trolley.webp"
82
+ alt
83
+ />
84
+ <div class="col-extended row-span-full mb-fluid-lg">
85
+ <p-heading tag="h1" size="3xl">
86
+ <span class="text-md block">Pattern</span>
87
+ Header
88
+ </p-heading>
89
+ </div>
90
+ </section>
91
+ </main>
92
+ <script type="module" src="main.js"></script>
93
+ </body>
94
+ </html>
95
+ ```
96
+
97
+ ## Script
98
+
99
+ ```js
100
+ // DO NOT USE IN PRODUCTION!
101
+ // EXAMPLE CODE FOR DEMONSTRATION PURPOSE ONLY.
102
+
103
+ // Behaviour of the header navigation: the menu button opens the drilldown, and the drilldown reports the level
104
+ // the user drilled into.
105
+
106
+ const navButton = document.getElementById('nav-button');
107
+ const navDrilldown = document.getElementById('nav-drilldown');
108
+
109
+ navButton.addEventListener('click', () => {
110
+ navDrilldown.open = true;
111
+ });
112
+
113
+ // Closing is requested by the component (Escape, the close button, a click on the backdrop) – the open state is
114
+ // owned by the page, so it has to be written back.
115
+ navDrilldown.addEventListener('dismiss', (e) => {
116
+ e.target.open = false;
117
+ });
118
+
119
+ navDrilldown.addEventListener('update', (e) => {
120
+ e.target.activeIdentifier = e.detail.activeIdentifier;
121
+ });
122
+ ```