Skip to content

Commit e1cd2f2

Browse files
committed
Add draft for an events design system
1 parent aa71447 commit e1cd2f2

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Events Design System
2+
3+
You will learn:
4+
5+
- What different events there are.
6+
- The right element for each event.
7+
- The correct HTML for functionality and accessibility.
8+
9+
## Link
10+
11+
```html
12+
<a href="/about">About me</a>
13+
```
14+
15+
- Anti-pattern: adding a navigation event handler to another element like `<button onClick={() => router.goTo(…)}>`
16+
17+
## Click
18+
19+
```html
20+
<button>Add to favorites</button>
21+
```
22+
23+
- Anti-pattern: adding a click handler to an inert element like `<div>`.
24+
- Anti-pattern: adding a click handler to a link like `<a href="#" onClick={…}>`.
25+
26+
## Input
27+
28+
```html
29+
<input type="text" />
30+
```
31+
32+
```html
33+
<textarea></textarea>
34+
```
35+
36+
## Choose
37+
38+
```html
39+
<label for="color-scheme-select">Choose a color scheme</label>
40+
<select id="color-scheme-select">
41+
<option value="dark">Dark</option>
42+
<option value="light">Light</option>
43+
<option value="system">System</option>
44+
</select>
45+
```
46+
47+
```html
48+
<fieldset>
49+
<legend>Choose a color scheme</legend>
50+
<label for="radio-dark"><input type="radio" id="radio-dark" value="dark" /> Dark</label>
51+
<label for="radio-light"><input type="radio" id="radio-light" value="light" /> Light</label>
52+
<label for="radio-system"><input type="radio" id="radio-system" value="system" /> System</label>
53+
</fieldset>
54+
```
55+
56+
## Search
57+
58+
```html
59+
<input type="searchbox" />
60+
```
61+
62+
## Autocomplete

0 commit comments

Comments
 (0)