textarea.vue
4.21 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<script setup>
import * as demoCode from '@/views/demos/forms/form-elements/textarea/demoCodeTextarea'
</script>
<template>
<VRow class="match-height">
<VCol
cols="12"
md="6"
>
<!-- 👉 Basic -->
<AppCardCode
title="Basic"
:code="demoCode.basic"
>
<p>
v-textarea in its simplest form is a multi-line text-field, useful for larger amounts of text.
</p>
<DemoTextareaBasic />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Auto Grow -->
<AppCardCode
title="Auto Grow"
:code="demoCode.autoGrow"
>
<p>When using the <code>auto-grow</code> prop, textarea's will automatically increase in size when the contained text exceeds its size.</p>
<DemoTextareaAutoGrow />
</AppCardCode>
</VCol>
<VCol cols="12">
<!-- 👉 Variant -->
<AppCardCode
title="Variant"
:code="demoCode.variant"
>
<p>Use <code>filled</code>, <code>plain</code>, <code>outlined</code>, <code>solo</code> and <code>underlined</code> option of <code>variant</code> prop to change the look of file input.</p>
<DemoTextareaVariant />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 States -->
<AppCardCode
title="States"
:code="demoCode.states"
>
<p>Use <code>disabled</code> and <code>readonly</code> prop to change the state of textarea.</p>
<DemoTextareaStates />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Browser autocomplete -->
<AppCardCode
title="Browser autocomplete"
:code="demoCode.browserAutocomplete"
>
<p>
The <code>autocomplete</code> prop gives you the option to enable the browser to predict user input.
</p>
<DemoTextareaBrowserAutocomplete />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Clearable -->
<AppCardCode
title="Clearable"
:code="demoCode.clearable"
>
<p>You can clear the text from a <code>v-textarea</code> by using the <code>clearable</code> prop, and customize the icon used with the <code>clearable-icon</code> prop.</p>
<DemoTextareaClearable />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Counter -->
<AppCardCode
title="Counter"
:code="demoCode.counter"
>
<p>
The <code>counter</code> prop informs the user of a character limit for the <code>v-textarea</code>.
</p>
<DemoTextareaCounter />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Icons -->
<AppCardCode
title="Icons"
:code="demoCode.icons"
>
<p>The <code>append-icon</code>, <code>prepend-icon</code>, <code>append-inner-icon</code> and <code>prepend-inner-icon</code> props help add context to v-textarea.</p>
<DemoTextareaIcons />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Rows -->
<AppCardCode
title="Rows"
:code="demoCode.rows"
>
<p>The <code>rows</code> prop allows you to define how many rows the textarea has, when combined with the <code>row-height</code> prop you can further customize your rows by defining their height.</p>
<DemoTextareaRows />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 No resize -->
<AppCardCode
title="No resize"
:code="demoCode.noResize"
>
<p><code>v-textarea</code>'s have the option to remain the same size regardless of their content's size, using the <code>no-resize</code> prop.</p>
<DemoTextareaNoResize />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Validation -->
<AppCardCode
title="Validation"
:code="demoCode.validation"
>
<p>Use <code>rules</code> prop to validate the textarea.</p>
<DemoTextareaValidation />
</AppCardCode>
</VCol>
</VRow>
</template>