Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
74 lines (65 loc) · 2.09 KB
/
Copy pathindex.html
File metadata and controls
74 lines (65 loc) · 2.09 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>basic-tabs</title>
<!-- TODO: Use npm distribution of v1 polyfills when available. -->
<script src="../demos/bower_components/shadydom/shadydom.min.js"></script>
<script src="../demos/bower_components/custom-elements/custom-elements.min.js"></script>
<script src="../demos/bower_components/custom-elements/src/native-shim.js"></script>
<script src="../demos/bower_components/custom-elements/src/htmlelement-instanceof.js"></script>
<script src="./dist/basic-tabs.js"></script>
<link rel="stylesheet" href="../demos/demos.css">
<style>
basic-tabs {
display: -webkit-flex;
display: flex;
height: 300px;
max-width: 100%;
width: 400px;
}
.panel {
-webkit-align-items: center;
align-items: center;
display: -webkit-flex;
display: flex;
-webkit-flex: 1;
flex: 1;
-webkit-justify-content: center;
justify-content: center;
}
</style>
<script>
function spreadChange(event) {
document.querySelector('basic-tabs').spreadTabs = event.target.checked;
}
function tabPositionChange(event) {
document.querySelector('basic-tabs').tabPosition = event.target.value;
}
</script>
</head>
<body>
<p>
The basic-tabs component applies a stock combination of a
<a href="../basic-tab-strip/">basic-tab-strip</a> and a
<a href="../basic-modes/">basic-modes</a> element.
</p>
<basic-tabs>
<div class="panel" aria-label="One">Page one</div>
<div class="panel" aria-label="Two">Page two</div>
<div class="panel" aria-label="Three">Page three</div>
</basic-tabs>
<p>
<label><input id="spreadCheckbox" type="checkbox" onchange="spreadChange(event)">Spread tabs out</label>
</p>
<p>
Show tabs on: <select id="tabPosition" onchange="tabPositionChange(event)" value="top">
<option value="top">Top</option>
<option value="left">Left</option>
<option value="right">Right</option>
<option value="bottom">Bottom</option>
</select>
</p>
</body>
</html>