-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloading.html
More file actions
54 lines (48 loc) · 1.57 KB
/
loading.html
File metadata and controls
54 lines (48 loc) · 1.57 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>µCSS — Loading</title>
<link rel="stylesheet" href="../dist/mu.css">
</head>
<body>
<main class="container">
<hgroup>
<h1>Loading</h1>
<p>Loading states using <code>aria-busy="true"</code>.</p>
</hgroup>
<p><a href="index.html">← Back to examples</a></p>
<p><button class="btn btn-sm btn-secondary" onclick="document.documentElement.dataset.theme = document.documentElement.dataset.theme === 'dark' ? 'light' : 'dark'">Toggle dark mode</button></p>
<section>
<h2>Button loading</h2>
<p>
<button aria-busy="true">Please wait...</button>
<button aria-busy="true" class="secondary">Loading</button>
<button aria-busy="true" class="contrast">Processing</button>
</p>
</section>
<section>
<h2>Empty loading (standalone spinner)</h2>
<div aria-busy="true" style="min-height: 3rem;"></div>
</section>
<section>
<h2>Loading on a card</h2>
<article aria-busy="true">
<p>This card is loading...</p>
</article>
</section>
<section>
<h2>Loading paragraph</h2>
<p aria-busy="true">Loading content...</p>
</section>
<section>
<h2>Toggle loading</h2>
<button onclick="var t=document.getElementById('toggle-target'); t.ariaBusy = t.ariaBusy === 'true' ? 'false' : 'true';">Toggle loading state</button>
<article id="toggle-target" aria-busy="false">
<p>Click the button above to toggle the loading state on this card.</p>
</article>
</section>
</main>
</body>
</html>