-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdemo.html
105 lines (93 loc) · 3.42 KB
/
demo.html
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<script type="module" src="seven-minute-tabs.js" async></script>
</head>
<body>
<h1>Seven Minute Tabs</h1>
<seven-minute-tabs>
<ol role="tablist" aria-label="What does this tab chooser do?">
<li><a href="#first-tab" role="tab">First tab</a></li>
<li><a href="#second-tab" role="tab">Second tab</a></li>
<li><a href="#third-tab" role="tab">Third tab</a></li>
</ol>
<div id="first-tab" role="tabpanel">
First tab content
</div>
<div id="second-tab" role="tabpanel">
Second tab content
</div>
<div id="third-tab" role="tabpanel">
Third tab content
</div>
</seven-minute-tabs>
<h2>Persists across page views</h2>
<seven-minute-tabs persist sync>
<ol role="tablist" aria-label="What does this tab chooser do?">
<li><a href="#first-tab-b1" role="tab" data-tabs-persist="group1:firsttab">First tab</a></li>
<li><a href="#second-tab-b1" role="tab" data-tabs-persist="group1:secondtab">Second tab</a></li>
<li><a href="#third-tab-b1" role="tab" data-tabs-persist="group1:thirdtab">Third tab</a></li>
</ol>
<div id="first-tab-b1" role="tabpanel">
First tab content
</div>
<div id="second-tab-b1" role="tabpanel">
Second tab content
</div>
<div id="third-tab-b1" role="tabpanel">
Third tab content
</div>
</seven-minute-tabs>
<seven-minute-tabs persist sync>
<ol role="tablist" aria-label="What does this tab chooser do?">
<li><a href="#first-tab-b2" role="tab" data-tabs-persist="group1:firsttab">First tab</a></li>
<li><a href="#second-tab-b2" role="tab" data-tabs-persist="group1:secondtab">Second tab</a></li>
<li><a href="#third-tab-b2" role="tab" data-tabs-persist="group1:thirdtab">Third tab</a></li>
</ol>
<div id="first-tab-b2" role="tabpanel">
First tab content
</div>
<div id="second-tab-b2" role="tabpanel">
Second tab content
</div>
<div id="third-tab-b2" role="tabpanel">
Third tab content
</div>
</seven-minute-tabs>
<p><strong>Separate persist group:</strong></p>
<seven-minute-tabs persist>
<ol role="tablist" aria-label="What does this tab chooser do?">
<li><a href="#first-tab-b3" role="tab" data-tabs-persist="group2:firsttab">First tab</a></li>
<li><a href="#second-tab-b3" role="tab" data-tabs-persist="group2:secondtab">Second tab</a></li>
<li><a href="#third-tab-b3" role="tab" data-tabs-persist="group2:thirdtab">Third tab</a></li>
</ol>
<div id="first-tab-b3" role="tabpanel">
First tab content
</div>
<div id="second-tab-b3" role="tabpanel">
Second tab content
</div>
<div id="third-tab-b3" role="tabpanel">
Third tab content
</div>
</seven-minute-tabs>
<h2>Prune buttons that don’t have a matching panel</h2>
<seven-minute-tabs prune>
<div role="tablist" aria-label="What does this tab chooser do?">
<a href="#first-tab-c" role="tab">First tab</a>
<a href="#second-tab-c" role="tab">Second tab</a>
<a href="#missing" role="tab">Third tab</a>
</div>
<div id="first-tab-c" role="tabpanel">
First tab content
</div>
<div id="second-tab-c" role="tabpanel">
Second tab content
</div>
</seven-minute-tabs>
<p>Why is this unstyled? Read more at the <a href="https://github.com/zachleat/seven-minute-tabs">documentation on GitHub</a></p>
</body>
</html>