-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.html
More file actions
644 lines (581 loc) · 38.3 KB
/
demo.html
File metadata and controls
644 lines (581 loc) · 38.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Tags Demo</title>
<!--
Import the main index file.
Assumes this file is in a folder sibling to 'src'.
-->
<link rel="stylesheet" href="../index.css">
<!-- Demo-specific styles (minimal, just using the library's own tokens) -->
<style>
/* Using the library's tokens for the demo page body */
body {
padding-block: var(--space-xl);
}
h1 {
color: var(--theme-primary);
}
h2 {
margin-top: var(--space-2xl);
padding-bottom: var(--space-sm);
border-bottom: 1px solid var(--outline-subtle);
color: var(--text-overt);
}
.section-desc {
color: var(--text-subtle);
margin-bottom: var(--space-lg);
}
/* Visually separate examples */
.example-block {
border: 1px solid var(--outline-subtle);
padding: var(--space-lg);
border-radius: var(--radius-lg);
background-color: var(--surface-subtle);
}
</style>
</head>
<body>
<!-- Using <layout-center> to contain the entire demo page -->
<layout-center max-width="1200px">
<header>
<layout-stack gap="1rem">
<h1>CSS Tags Demo</h1>
<p>A comprehensive showcase of the declarative components and features.</p>
<!-- THEME SWITCHER -->
<flex gap="0.5rem" align="center" wrap="wrap">
<strong>Try a theme:</strong>
<button onclick="document.documentElement.dataset.theme=''">Default</button>
<button onclick="document.documentElement.dataset.theme='ocean'">Ocean</button>
<button onclick="document.documentElement.dataset.theme='sunrise'">Sunrise</button>
<button onclick="document.documentElement.dataset.theme='forest'">Forest</button>
</flex>
</layout-stack>
</header>
<main>
<!-- ================================================================== -->
<!-- SECTION 4: UI COMPONENTS -->
<!-- ================================================================== -->
<section>
<h2>4. UI Components</h2>
<p class="section-desc">Common UI patterns built with modern CSS.</p>
<layout-stack gap="2rem">
<div class="example-block">
<h3>Card Components</h3>
<p>Beautiful, responsive cards with container queries, hover effects, and flexible layouts.</p>
<layout-stack gap="2rem">
<div>
<h4>Basic Card Grid</h4>
<layout-grid columns="repeat(auto-fit, minmax(300px, 1fr))" gap="1.5rem">
<card style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white;">
<card-media>
<img src="https://picsum.photos/400/250?random=1" alt="Beautiful landscape">
</card-media>
<card-body>
<card-header>Serene Mountains</card-header>
<card-content>
Discover the breathtaking beauty of mountain landscapes that inspire and rejuvenate the soul.
</card-content>
<card-footer>Explore Nature →</card-footer>
</card-body>
</card>
<card style="background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: white;">
<card-media>
<img src="https://picsum.photos/400/250?random=2" alt="Urban architecture">
</card-media>
<card-body>
<card-header>Modern Architecture</card-header>
<card-content>
Innovative designs that blend functionality with aesthetic excellence in urban environments.
</card-content>
<card-footer>View Projects →</card-footer>
</card-body>
</card>
<card style="background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); color: white;">
<card-media>
<img src="https://picsum.photos/400/250?random=3" alt="Ocean waves">
</card-media>
<card-body>
<card-header>Ocean Adventures</card-header>
<card-content>
Embark on unforgettable journeys across vast oceans and discover hidden underwater worlds.
</card-content>
<card-footer>Start Journey →</card-footer>
</card-body>
</card>
</layout-grid>
</div>
<div>
<h4>Horizontal Cards (Wide Layout)</h4>
<layout-stack gap="1rem">
<card style="background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);">
<card-media>
<img src="https://picsum.photos/200/150?random=4" alt="Technology">
</card-media>
<card-body>
<card-header>Innovation Hub</card-header>
<card-content>
Cutting-edge technology solutions that drive progress and transform industries. Our team of experts delivers unparalleled innovation.
</card-content>
<card-footer>Learn More →</card-footer>
</card-body>
</card>
<card style="background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);">
<card-media>
<img src="https://picsum.photos/200/150?random=5" alt="Creative workspace">
</card-media>
<card-body>
<card-header>Creative Studio</card-header>
<card-content>
Where imagination meets execution. We craft compelling visual stories that captivate and inspire audiences worldwide.
</card-content>
<card-footer>View Portfolio →</card-footer>
</card-body>
</card>
</layout-stack>
</div>
<div>
<h4>Compact Cards</h4>
<layout-grid columns="repeat(auto-fit, minmax(250px, 1fr))" gap="1rem">
<card radius="0.5rem" style="background: #f0f9ff;">
<card-body style="padding: 1rem;">
<card-header style="font-size: 1rem;">Quick Tip</card-header>
<card-content style="font-size: 0.875rem;">
Small changes can lead to big improvements in productivity and well-being.
</card-content>
<card-footer style="font-size: 0.75rem;">Read More →</card-footer>
</card-body>
</card>
<card radius="0.5rem" style="background: #fef3c7;">
<card-body style="padding: 1rem;">
<card-header style="font-size: 1rem;">Daily Inspiration</card-header>
<card-content style="font-size: 0.875rem;">
Every day is a new opportunity to create something amazing and meaningful.
</card-content>
<card-footer style="font-size: 0.75rem;">Get Inspired →</card-footer>
</card-body>
</card>
<card radius="0.5rem" style="background: #e0f2fe;">
<card-body style="padding: 1rem;">
<card-header style="font-size: 1rem;">Tech Update</card-header>
<card-content style="font-size: 0.875rem;">
Stay ahead with the latest developments in web technology and design trends.
</card-content>
<card-footer style="font-size: 0.75rem;">Stay Updated →</card-footer>
</card-body>
</card>
</layout-grid>
</div>
<div>
<h4>Feature Cards with Actions</h4>
<layout-grid columns="repeat(auto-fit, minmax(280px, 1fr))" gap="1.5rem">
<card style="background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);">
<card-media style="background: linear-gradient(135deg, var(--hue-blue), var(--hue-purple)); height: 120px; display: flex; align-items: center; justify-content: center; color: white;">
<span style="font-size: 2rem;">🚀</span>
</card-media>
<card-body>
<card-header>Premium Plan</card-header>
<card-content>
Unlock advanced features and priority support with our premium subscription.
</card-content>
<flex gap="0.5rem" style="margin-top: 1rem;">
<button class="button" style="flex: 1;">Upgrade</button>
<button class="button" style="background: transparent; border: 1px solid var(--theme-primary);">Learn More</button>
</flex>
</card-body>
</card>
<card style="background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);">
<card-media style="background: linear-gradient(135deg, var(--hue-green), var(--hue-emerald)); height: 120px; display: flex; align-items: center; justify-content: center; color: white;">
<span style="font-size: 2rem;">📊</span>
</card-media>
<card-body>
<card-header>Analytics Dashboard</card-header>
<card-content>
Comprehensive insights and data visualization to drive informed decisions.
</card-content>
<flex gap="0.5rem" style="margin-top: 1rem;">
<button class="button" style="flex: 1;">View Dashboard</button>
<button class="button" style="background: transparent; border: 1px solid var(--theme-primary);">Demo</button>
</flex>
</card-body>
</card>
<card style="background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);">
<card-media style="background: linear-gradient(135deg, var(--hue-orange), var(--hue-red)); height: 120px; display: flex; align-items: center; justify-content: center; color: white;">
<span style="font-size: 2rem;">🎨</span>
</card-media>
<card-body>
<card-header>Design System</card-header>
<card-content>
Consistent, scalable design components that maintain brand integrity across platforms.
</card-content>
<flex gap="0.5rem" style="margin-top: 1rem;">
<button class="button" style="flex: 1;">Explore</button>
<button class="button" style="background: transparent; border: 1px solid var(--theme-primary);">Documentation</button>
</flex>
</card-body>
</card>
</layout-grid>
</div>
</layout-stack>
</div>
<div class="example-block">
<h3><code><img-container></code></h3>
<p>Advanced image container with aspect ratios, lazy loading, and responsive features.</p>
<layout-stack gap="2rem">
<div>
<h4>Basic Aspect Ratios</h4>
<layout-grid columns="repeat(auto-fit, minmax(200px, 1fr))" gap="1rem">
<img-container aspect-ratio="16/9" radius="0.5rem">
<img src="https://picsum.photos/400/225?random=10" alt="Landscape image" />
</img-container>
<img-container aspect-ratio="1" radius="0.5rem">
<img src="https://picsum.photos/400/400?random=11" alt="Square image" />
</img-container>
<img-container aspect-ratio="4/3" radius="0.5rem">
<img src="https://picsum.photos/400/300?random=12" alt="Portrait image" />
</img-container>
</layout-grid>
</div>
<div>
<h4>Object Fit Options</h4>
<layout-grid columns="repeat(auto-fit, minmax(150px, 1fr))" gap="1rem">
<div>
<p style="font-size: 0.75rem; margin-bottom: 0.5rem;">Cover</p>
<img-container aspect-ratio="1" object-fit="cover" radius="0.25rem">
<img src="https://picsum.photos/200/300?random=13" alt="Cover fit" />
</img-container>
</div>
<div>
<p style="font-size: 0.75rem; margin-bottom: 0.5rem;">Contain</p>
<img-container aspect-ratio="1" object-fit="contain" bg="#f5f5f5" radius="0.25rem">
<img src="https://picsum.photos/200/300?random=13" alt="Contain fit" />
</img-container>
</div>
<div>
<p style="font-size: 0.75rem; margin-bottom: 0.5rem;">Fill</p>
<img-container aspect-ratio="1" object-fit="fill" radius="0.25rem">
<img src="https://picsum.photos/200/300?random=13" alt="Fill fit" />
</img-container>
</div>
</layout-grid>
</div>
<div>
<h4>Themed Containers</h4>
<layout-grid columns="repeat(auto-fit, minmax(200px, 1fr))" gap="1rem">
<img-container theme="card" aspect-ratio="3/4">
<img src="https://picsum.photos/300/400?random=14" alt="Card theme" />
</img-container>
<img-container theme="hero" aspect-ratio="21/9">
<img src="https://picsum.photos/600/286?random=15" alt="Hero theme" />
</img-container>
<img-container theme="thumbnail" aspect-ratio="1">
<img src="https://picsum.photos/200/200?random=16" alt="Thumbnail theme" />
</img-container>
</layout-grid>
</div>
<div>
<h4>Lazy Loading</h4>
<p>Scroll down to see images load lazily.</p>
<layout-grid columns="repeat(auto-fit, minmax(250px, 1fr))" gap="1rem">
<img-container aspect-ratio="16/9" lazy radius="0.5rem">
<img data-src="https://picsum.photos/400/225?random=17" alt="Lazy loaded 1" />
</img-container>
<img-container aspect-ratio="16/9" lazy radius="0.5rem">
<img data-src="https://picsum.photos/400/225?random=18" alt="Lazy loaded 2" />
</img-container>
<img-container aspect-ratio="16/9" lazy radius="0.5rem">
<img data-src="https://picsum.photos/400/225?random=19" alt="Lazy loaded 3" />
</img-container>
</layout-grid>
</div>
</layout-stack>
</div>
</layout-stack>
</section>
<!-- ================================================================== -->
<!-- SECTION 5: NEW COMPONENTS -->
<!-- ================================================================== -->
<section>
<h2>5. New Components: Table, Form, Navigation</h2>
<p class="section-desc">Recently added components for data display, user input, and site navigation.</p>
<layout-stack gap="2rem">
<div class="example-block">
<h3><code><table></code> with Responsive Design</h3>
<p>Responsive table that stacks on small screens using container queries.</p>
<data-table>
<table>
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Role</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td data-label="Name">John Doe</td>
<td data-label="Email">john@example.com</td>
<td data-label="Role">Developer</td>
<td data-label="Status">Active</td>
</tr>
<tr>
<td data-label="Name">Jane Smith</td>
<td data-label="Email">jane@example.com</td>
<td data-label="Role">Designer</td>
<td data-label="Status">Pending</td>
</tr>
</tbody>
</table>
</data-table>
</div>
<div class="example-block">
<h3>Form Components</h3>
<p>Accessible form elements with focus states and variants.</p>
<form>
<layout-stack gap="1rem">
<input type="text" class="form-input" placeholder="Enter your name" required>
<input type="email" class="form-input" placeholder="Enter your email" required>
<select class="form-select">
<option>Select role</option>
<option>Developer</option>
<option>Designer</option>
</select>
<textarea class="form-textarea" placeholder="Your message"></textarea>
<flex gap="1rem">
<button type="submit" class="form-button btn-primary">Submit</button>
<button type="reset" class="form-button btn-secondary">Reset</button>
</flex>
</layout-stack>
</form>
</div>
<div class="example-block">
<h3>Navigation Components</h3>
<p>Responsive navbar and sidebar for site navigation.</p>
<nav class="navbar">
<div class="nav-brand">My Site</div>
<ul class="nav-links">
<li><a href="#" class="nav-link">Home</a></li>
<li><a href="#" class="nav-link">About</a></li>
<li><a href="#" class="nav-link">Contact</a></li>
</ul>
<button class="nav-toggle">☰</button>
</nav>
<div class="sidebar-layout" style="margin-top: 1rem;">
<aside class="sidebar">
<div class="sidebar-section">Menu</div>
<ul class="sidebar-nav">
<li><a href="#" class="sidebar-link">Dashboard</a></li>
<li><a href="#" class="sidebar-link">Profile</a></li>
<li><a href="#" class="sidebar-link">Settings</a></li>
</ul>
</aside>
<main>Main content area</main>
</div>
</div>
</layout-stack>
</section>
<!-- ================================================================== -->
<!-- SECTION 5: MODERN INTERACTIVE -->
<!-- ================================================================== -->
<section>
<h2>5. Modern Interactive (Popover API & Anchor Positioning)</h2>
<p class="section-desc">Using the native Popover API and Anchor Positioning. No JS required for the basic functionality.</p>
<layout-stack gap="2rem">
<div class="example-block">
<h3>Native Popover</h3>
<button popovertarget="demo-popover" class="button">Open Popover</button>
<div id="demo-popover" popover>
<h3>Hello!</h3>
<p>I am a native <code>popover</code> element, styled by the library. Click outside or press Escape to close me.</p>
<p>I automatically appear in the top layer and have built-in entry/exit animations.</p>
</div>
</div>
<div class="example-block">
<h3>Advanced Tooltip</h3>
<p>Uses <b>Anchor Positioning</b> to tether to its button, and the <b>Popover API</b> to appear on top.</p>
<flex gap="2rem" wrap="wrap" justify="center" p="3rem">
<button aria-describedby="tt-top" class="button">
Top Tooltip
<tooltip id="tt-top" position="top" arrow>I'm tethered to the top!</tooltip>
</button>
<button aria-describedby="tt-right" class="button">
Right Tooltip
<tooltip id="tt-right" position="right" variant="info" arrow>Info on the right.</tooltip>
</button>
<button aria-describedby="tt-bottom" class="button">
Bottom Tooltip
<tooltip id="tt-bottom" position="bottom" variant="success" arrow>Success on the bottom.</tooltip>
</button>
</flex>
</div>
<div class="example-block">
<h3>Modal</h3>
<button onclick="document.getElementById('demo-modal').style.display='grid'" class="button">Open Modal</button>
<!-- Simple Modal structure -->
<div id="demo-modal" class="modal" style="display: none;">
<div class="modal__panel">
<h3>Modal Title</h3>
<p>This is the modal content. The backdrop is handled by the <code>.modal</code> wrapper.</p>
<flex justify="end" gap="1rem" style="margin-top: 2rem;">
<button onclick="document.getElementById('demo-modal').style.display='none'" class="button">Close</button>
</flex>
</div>
</div>
</div>
</layout-stack>
</section>
<!-- ================================================================== -->
<!-- SECTION 6: ADVANCED LAYOUTS -->
<!-- ================================================================== -->
<section>
<h2>6. Advanced Layouts</h2>
<p class="section-desc">Experimental or slightly enhanced layouts.</p>
<layout-stack gap="2rem">
<div class="example-block">
<h3>Carousel Components</h3>
<p>Responsive carousels with touch support, scroll-snap fallback, and customizable animations.</p>
<layout-stack gap="2rem">
<div>
<h4>Basic Carousel</h4>
<carousel>
<div class="carousel-slides">
<carousel-item><box bg="var(--hue-blue)" p="4rem" align="center" color="white">Slide 1</box></carousel-item>
<carousel-item><box bg="var(--hue-green)" p="4rem" align="center" color="white">Slide 2</box></carousel-item>
<carousel-item><box bg="var(--hue-red)" p="4rem" align="center" color="white">Slide 3</box></carousel-item>
</div>
<carousel-trigger direction="prev">←</carousel-trigger>
<carousel-trigger direction="next">→</carousel-trigger>
</carousel>
</div>
<div>
<h4>Looping Carousel</h4>
<carousel loop>
<div class="carousel-slides">
<carousel-item><box bg="var(--hue-purple)" p="4rem" align="center" color="white">Infinite 1</box></carousel-item>
<carousel-item><box bg="var(--hue-orange)" p="4rem" align="center" color="white">Infinite 2</box></carousel-item>
<carousel-item><box bg="var(--hue-cyan)" p="4rem" align="center" color="white">Infinite 3</box></carousel-item>
</div>
<carousel-trigger direction="prev">←</carousel-trigger>
<carousel-trigger direction="next">→</carousel-trigger>
</carousel>
</div>
<div>
<h4>Content Carousel</h4>
<carousel loop duration="300ms">
<div class="carousel-slides">
<carousel-item>
<card>
<card-header>
<h3>Feature One</h3>
</card-header>
<card-body>
<p>Discover amazing features with smooth transitions.</p>
</card-body>
</card>
</carousel-item>
<carousel-item>
<card>
<card-header>
<h3>Feature Two</h3>
</card-header>
<card-body>
<p>Touch-friendly navigation and responsive design.</p>
</card-body>
</card>
</carousel-item>
<carousel-item>
<card>
<card-header>
<h3>Feature Three</h3>
</card-header>
<card-body>
<p>Built with modern CSS and enhanced with JavaScript.</p>
</card-body>
</card>
</carousel-item>
</div>
<carousel-trigger direction="prev">←</carousel-trigger>
<carousel-trigger direction="next">→</carousel-trigger>
</carousel>
</div>
<div>
<h4>Image Carousel</h4>
<carousel loop duration="400ms" timing-function="ease-in-out">
<div class="carousel-slides">
<carousel-item><img src="https://picsum.photos/600/300?random=1" alt="Random image 1" style="width: 100%; height: auto; display: block;"></carousel-item>
<carousel-item><img src="https://picsum.photos/600/300?random=2" alt="Random image 2" style="width: 100%; height: auto; display: block;"></carousel-item>
<carousel-item><img src="https://picsum.photos/600/300?random=3" alt="Random image 3" style="width: 100%; height: auto; display: block;"></carousel-item>
</div>
<carousel-trigger direction="prev">←</carousel-trigger>
<carousel-trigger direction="next">→</carousel-trigger>
</carousel>
</div>
</layout-stack>
</div>
<div class="example-block">
<h3>Masonry Layout (Experimental)</h3>
<p>Requires browser flag enabling. Falls back gracefully if not supported.</p>
<masonry-layout cols="repeat(auto-fill, minmax(150px, 1fr))" gap="1rem">
<box bg="var(--surface-muted)" p="1rem" style="height: 100px;">1</box>
<box bg="var(--surface-muted)" p="1rem" style="height: 200px;">2</box>
<box bg="var(--surface-muted)" p="1rem" style="height: 150px;">3</box>
<box bg="var(--surface-muted)" p="1rem" style="height: 250px;">4</box>
<box bg="var(--surface-muted)" p="1rem" style="height: 120px;">5</box>
<box bg="var(--surface-muted)" p="1rem" style="height: 180px;">6</box>
</masonry-layout>
</div>
</layout-stack>
</section>
<!-- ================================================================== -->
<!-- SECTION 7: VIEW TRANSITIONS (SPA) -->
<!-- ================================================================== -->
<section>
<h2>7. View Transitions (SPA Example)</h2>
<p class="section-desc">A simple router using the View Transitions API for app-like state changes. Click the buttons below.</p>
<div class="example-block" style="min-height: 300px;">
<view-transitions>
<!-- Page 1 -->
<view-page id="page-1" active>
<box p="2rem" bg="var(--surface-subtle)">
<h3>Page One</h3>
<p>This is the first page. Notice the "Hero Element" image below.</p>
<img src="https://picsum.photos/id/237/100/100" style="view-transition-name: hero-element; border-radius: 50%;">
<box m="2rem 0">
<nav-trigger to="page-2">
<button class="button">Go to Page Two →</button>
</nav-trigger>
</box>
</box>
</view-page>
<!-- Page 2 -->
<view-page id="page-2">
<box p="2rem" bg="var(--surface-overt)">
<h3>Page Two</h3>
<p>The page slid in, and the "Hero Element" morphed to its new position and size.</p>
<img src="https://picsum.photos/id/237/300/200" style="view-transition-name: hero-element; border-radius: 12px;">
<box m="2rem 0">
<nav-trigger to="page-1">
<button class="button">← Go Back to Page One</button>
</nav-trigger>
</box>
</box>
</view-page>
</view-transitions>
</div>
</section>
</main>
<footer>
<box p="3rem 0" align="center" color="var(--text-subtle)">
CSS Tags Demo
</box>
</footer>
</layout-center>
<!-- Import required JavaScript -->
<script src="../carousel.js" defer></script>
<script src="../view-transition.js" defer></script>
<script src="../components/img-container.js" defer></script>
</body>
</html>