-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
50 lines (41 loc) · 1.48 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ayMenuButton</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<script src="./dist/index.js"></script>
<style>
html {
font-family: system-ui, -apple-system, sans-serif;
}
body {
margin: 0;
padding: 8px;
}
</style>
</head>
<body>
<h1>ayMenuButton</h1>
<menu id="menu1" type="context">
<menuitem>Item 1</menuitem>
<menuitem label="Item 2" disabled></menuitem>
<menuitem label="Item 3"></menuitem>
<hr>
<menuitem label="Item 4"></menuitem>
</menu>
<p>This is an example of a button with a drop down menu. It is keyboard accessible, and screen-reader friendly.</p>
<button id="btn1" data-type="menu" menu="menu1">Open Menu</button>
<p>The code is framework-agnostic, and can be found <a href="https://github.com/AyogoHealth/ay-menu-button">on GitHub</a>.</p>
<hr style="margin: 2em 0 1em">
<footer style="text-align: center; font-size: small;">
Copyright © 2016 – 2023 <a href="http://ayogo.com">Ayogo Health Inc.</a>
<br>
MIT Licence
</footer>
<script>
var btn = document.getElementById('btn1');
MenuButton(btn);
</script>
</body>
</html>