-
Notifications
You must be signed in to change notification settings - Fork 87
/
Copy pathnumber-field.html
96 lines (92 loc) · 2.77 KB
/
number-field.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Number Field</title>
<script type="module" src="./common.js"></script>
<script type="module">
import '@vaadin/number-field/src/vaadin-lit-number-field.js';
import '@vaadin/icon/src/vaadin-lit-icon.js';
import '@vaadin/vaadin-lumo-styles/vaadin-iconset.js';
import '@vaadin/icons';
</script>
</head>
<body>
<section>
<h2>Plain</h2>
<vaadin-number-field value="42"></vaadin-number-field>
<vaadin-number-field placeholder="Placeholder"></vaadin-number-field>
<br><br>
<vaadin-number-field step-buttons-visible value="42"></vaadin-number-field>
<vaadin-number-field placeholder="Placeholder" step-buttons-visible></vaadin-number-field>
</section>
<section>
<h2>Bells & Whistles</h2>
<vaadin-number-field
clear-button-visible
error-message="You need to write something in this field."
helper-text="Description for this field."
label="Label"
required
value="42">
<span slot="prefix">€</span>
</vaadin-number-field>
<vaadin-number-field
clear-button-visible
error-message="You need to write something in this field."
helper-text="Description for this field."
label="Label"
required
step-buttons-visible
value="42">
<span slot="prefix">€</span>
</vaadin-number-field>
</section>
<section>
<h2>States</h2>
<vaadin-number-field
clear-button-visible
error-message="You need to write something in this field."
helper-text="Description for this field."
label="Read-only"
readonly
required
value="42">
<span slot="prefix">€</span>
</vaadin-number-field>
<vaadin-number-field
clear-button-visible
disabled
error-message="You need to write something in this field."
helper-text="Description for this field."
label="Disabled"
required
value="42">
<span slot="prefix">€</span>
</vaadin-number-field>
<br><br>
<vaadin-number-field
clear-button-visible
error-message="You need to write something in this field."
helper-text="Description for this field."
label="Read-only"
readonly
required
step-buttons-visible
value="42">
</vaadin-number-field>
<vaadin-number-field
clear-button-visible
disabled
error-message="You need to write something in this field."
helper-text="Description for this field."
label="Disabled"
required
step-buttons-visible
value="42">
</vaadin-number-field>
</section>
</body>
</html>