textfield.vue
5.46 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<script setup>
import * as demoCode from '@/views/demos/forms/form-elements/textfield/demoCodeTextfield'
</script>
<template>
<VRow class="match-height">
<VCol
cols="12"
md="6"
>
<!-- 👉 Basic -->
<AppCardCode
title="Basic"
:code="demoCode.basic"
>
<p>Text fields components are used for collecting user provided information.</p>
<DemoTextfieldBasic />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Density -->
<AppCardCode
title="Density"
:code="demoCode.density"
>
<p>The <code>density</code> prop decreases the height of the text field based upon 1 of 3 levels of density; <code>default</code>, <code>comfortable</code>, and <code>compact</code>.</p>
<DemoTextfieldDensity />
</AppCardCode>
</VCol>
<VCol cols="12">
<!-- 👉 Variant -->
<AppCardCode
title="Variant"
:code="demoCode.variant"
>
<p>Use <code>solo</code>, <code>filled</code>, <code>outlined</code>, <code>plain</code> and <code>underlined</code> option of <code>variant</code> prop to change the look of the textfield. </p>
<DemoTextfieldVariant />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 State -->
<AppCardCode
title="State"
:code="demoCode.state"
>
<p>Text fields can be disabled or readonly.</p>
<DemoTextfieldState />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Counter -->
<AppCardCode
title="Counter"
:code="demoCode.counter"
>
<p>Use a <code>counter</code> prop to inform a user of the character limit.</p>
<DemoTextfieldCounter />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Clearable -->
<AppCardCode
title="Clearable"
:code="demoCode.clearable"
>
<p>When clearable, you can customize the clear icon with clear-icon.</p>
<DemoTextfieldClearable />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Custom Colors -->
<AppCardCode
title="Custom Colors"
:code="demoCode.customColors"
>
<p>Use <code>color</code> prop to change the input border color.</p>
<DemoTextfieldCustomColors />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Icons -->
<AppCardCode
title="Icons"
:code="demoCode.icons"
>
<p>You can add icons to the text field with <code>prepend-icon</code>, <code>append-icon</code> and <code>append-inner-icon</code> and <code>prepend-inner-icon</code> props.</p>
<DemoTextfieldIcons />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Prefixes and suffixes -->
<AppCardCode
title="Prefixes and suffixes"
:code="demoCode.prefixesAndSuffixes"
>
<p>The <code>prefix</code> and <code>suffix</code> properties allows you to prepend and append inline non-modifiable text next to the text field.</p>
<DemoTextfieldPrefixesAndSuffixes />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Single line -->
<AppCardCode
title="Single line"
:code="demoCode.singleLine"
>
<p><code>single-line</code> text fields do not float their label on focus or with data.</p>
<DemoTextfieldSingleLine />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Validation -->
<AppCardCode
title="Validation"
:code="demoCode.validation"
>
<p>Vuetify includes simple validation through the <code>rules</code> prop.</p>
<DemoTextfieldValidation />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Icon events -->
<AppCardCode
title="Icon events"
:code="demoCode.iconEvents"
>
<p><code>click:prepend</code>, <code>click:append</code>, <code>click:append-inner</code>, and <code>click:clear</code> will be emitted when you click on the respective icon</p>
<DemoTextfieldIconEvents />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Label Slot -->
<AppCardCode
title="Label Slot"
:code="demoCode.labelSlot"
>
<p>Text field label can be defined in <code>label</code> slot - that will allow to use HTML content.</p>
<DemoTextfieldLabelSlot />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Password input -->
<AppCardCode
title="Password input"
:code="demoCode.passwordInput"
>
<p>Using the HTML input <code>type</code> password can be used with an appended icon and callback to control the visibility.</p>
<DemoTextfieldPasswordInput />
</AppCardCode>
</VCol>
<VCol
cols="12"
md="6"
>
<!-- 👉 Icon slots -->
<AppCardCode
title="Icon slots"
:code="demoCode.iconSlots"
>
<p>Instead of using <code>prepend</code>/<code>append</code>/<code>append-inner</code> icons you can use slots to extend input's functionality.</p>
<DemoTextfieldIconSlots />
</AppCardCode>
</VCol>
</VRow>
</template>