-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforms-advanced.html
More file actions
106 lines (98 loc) · 2.47 KB
/
forms-advanced.html
File metadata and controls
106 lines (98 loc) · 2.47 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>µCSS — Forms (advanced)</title>
<link rel="stylesheet" href="../dist/mu.css">
</head>
<body>
<main class="container">
<hgroup>
<h1>Forms (advanced)</h1>
<p>Specialized input types: color, date, time, file, search.</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>Color picker</h2>
<label>Pick a color
<input type="color" value="#0172ad">
</label>
</section>
<section>
<h2>Date & time</h2>
<label>Date
<input type="date">
</label>
<label>Time
<input type="time">
</label>
<label>Date and time
<input type="datetime-local">
</label>
<label>Month
<input type="month">
</label>
<label>Week
<input type="week">
</label>
</section>
<section>
<h2>File upload</h2>
<label>Choose a file
<input type="file">
</label>
<label>Multiple files
<input type="file" multiple>
</label>
</section>
<section>
<h2>Search</h2>
<label>Search
<input type="search" placeholder="Search...">
</label>
<h3>Search with group</h3>
<div role="search">
<input type="search" placeholder="Search...">
<button>Go</button>
</div>
</section>
<section>
<h2>Other input types</h2>
<label>Number
<input type="number" value="42" min="0" max="100">
</label>
<label>URL
<input type="url" placeholder="https://example.com">
</label>
<label>Telephone
<input type="tel" placeholder="+1 (555) 123-4567">
</label>
<label>Password
<input type="password" value="secret123">
</label>
</section>
<section>
<h2>Disabled & readonly</h2>
<label>Disabled input
<input type="text" value="Cannot edit" disabled>
</label>
<label>Readonly input
<input type="text" value="Read only" readonly>
</label>
</section>
<section>
<h2>Helper text</h2>
<label>Email
<input type="email" placeholder="user@example.com" aria-invalid="true">
<small>Please enter a valid email address.</small>
</label>
<label>Username
<input type="text" value="johndoe" aria-invalid="false">
<small>Username is available.</small>
</label>
</section>
</main>
</body>
</html>