|
1 |
| -<!DOCTYPE html> |
| 1 | +<!doctype html> |
2 | 2 | <html lang="en">
|
3 | 3 | <head>
|
4 | 4 | <meta charset="UTF-8" />
|
|
8 | 8 | <script type="module" src="./common.js"></script>
|
9 | 9 |
|
10 | 10 | <script type="module">
|
| 11 | + import '@vaadin/icon'; |
| 12 | + import '@vaadin/icons'; |
11 | 13 | import '@vaadin/text-area';
|
12 |
| - import '@vaadin/tooltip'; |
| 14 | + import '@vaadin/vaadin-lumo-styles/vaadin-iconset.js'; |
13 | 15 | </script>
|
14 | 16 | </head>
|
15 | 17 |
|
16 | 18 | <body>
|
17 |
| - <vaadin-text-area label="Feedback" required> |
18 |
| - <vaadin-tooltip slot="tooltip" text="Help us improve"></vaadin-tooltip> |
19 |
| - </vaadin-text-area> |
| 19 | + <section> |
| 20 | + <h2>Plain</h2> |
| 21 | + <vaadin-text-area value="Value"></vaadin-text-area> |
| 22 | + <vaadin-text-area placeholder="Placeholder"></vaadin-text-area> |
| 23 | + </section> |
| 24 | + |
| 25 | + <section> |
| 26 | + <h2>Min & Max Rows</h2> |
| 27 | + <vaadin-text-area value="Value" min-rows="1" clear-button-visible> |
| 28 | + <vaadin-icon icon="vaadin:search" slot="prefix"></vaadin-icon> |
| 29 | + </vaadin-text-area> |
| 30 | + |
| 31 | + <vaadin-text-area |
| 32 | + value="I’m not sure what I should write here, but I know it should be something long because this is a multi-line text area." |
| 33 | + max-rows="3" |
| 34 | + clear-button-visible |
| 35 | + > |
| 36 | + <vaadin-icon icon="vaadin:search" slot="prefix"></vaadin-icon> |
| 37 | + </vaadin-text-area> |
| 38 | + </section> |
| 39 | + |
| 40 | + <section> |
| 41 | + <h2>Bells & Whistles</h2> |
| 42 | + <vaadin-text-area |
| 43 | + label="Label" |
| 44 | + helper-text="Description for this field." |
| 45 | + value="Value" |
| 46 | + clear-button-visible |
| 47 | + error-message="You need to write something in this field." |
| 48 | + required |
| 49 | + > |
| 50 | + <vaadin-icon icon="vaadin:search" slot="prefix"></vaadin-icon> |
| 51 | + </vaadin-text-area> |
| 52 | + </section> |
| 53 | + |
| 54 | + <section> |
| 55 | + <h2>States</h2> |
| 56 | + <vaadin-text-area |
| 57 | + label="Read-only" |
| 58 | + helper-text="Description for this field." |
| 59 | + value="Value" |
| 60 | + clear-button-visible |
| 61 | + error-message="You need to write something in this field." |
| 62 | + required |
| 63 | + readonly |
| 64 | + > |
| 65 | + <vaadin-icon icon="vaadin:search" slot="prefix"></vaadin-icon> |
| 66 | + </vaadin-text-area> |
| 67 | + |
| 68 | + <vaadin-text-area |
| 69 | + label="Disabled" |
| 70 | + helper-text="Description for this field." |
| 71 | + value="Value" |
| 72 | + clear-button-visible |
| 73 | + error-message="You need to write something in this field." |
| 74 | + required |
| 75 | + disabled |
| 76 | + > |
| 77 | + <vaadin-icon icon="vaadin:search" slot="prefix"></vaadin-icon> |
| 78 | + </vaadin-text-area> |
| 79 | + </section> |
| 80 | + |
| 81 | + <section> |
| 82 | + <h2>Helper Above Field</h2> |
| 83 | + <vaadin-text-area |
| 84 | + theme="helper-above-field" |
| 85 | + label="Label" |
| 86 | + helper-text="Description for this field." |
| 87 | + value="Value" |
| 88 | + clear-button-visible |
| 89 | + error-message="You need to write something in this field." |
| 90 | + required |
| 91 | + > |
| 92 | + <vaadin-icon icon="vaadin:search" slot="prefix"></vaadin-icon> |
| 93 | + </vaadin-text-area> |
| 94 | + </section> |
| 95 | + |
| 96 | + <section> |
| 97 | + <h2>Content & Layout Variations</h2> |
| 98 | + <p>Resize the field to test how content flows.</p> |
| 99 | + <vaadin-text-area |
| 100 | + label="A very long label for this field" |
| 101 | + helper-text="If the label wasn't enough to tell what you should input here, then this long description should be." |
| 102 | + value="I’m not sure what I should write here, but I know it should be something long because this is a multi-line text area." |
| 103 | + placeholder="Perhaps this gives you an idea what to write?" |
| 104 | + clear-button-visible |
| 105 | + error-message="In case you didn't write anything in this required field, this error message is here to let you know that you really should write something in this field." |
| 106 | + required |
| 107 | + style="resize: both; overflow: hidden; padding: 1px; width: 50%" |
| 108 | + > |
| 109 | + <vaadin-icon icon="vaadin:envelope-o" slot="prefix"></vaadin-icon> |
| 110 | + </vaadin-text-area> |
| 111 | + </section> |
20 | 112 | </body>
|
21 | 113 | </html>
|
0 commit comments