You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/components/_input-field-common-features.adoc
+37-35Lines changed: 37 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Visible labels are strongly recommended for all input fields. In cases where the
29
29
====
30
30
Helpers are used to provide additional information that the user may need to enter in the field, such as format requirements or explanations of the field's purpose below the field.
31
31
32
-
A style variant is available for rendering the helper <<#helper-above-field,above the field>>.
32
+
A <<styling#style-variants,style variant>> is available for rendering the helper above the field.
33
33
34
34
In addition to plain text, helpers can contain components and HTML elements. However, complex and interactive content is likely to have accessibility issues.
35
35
====
@@ -220,53 +220,55 @@ Note: add component-specific live examples after each of these includes.
220
220
////
221
221
222
222
223
-
// tag::styles-intro[]
223
+
// tag::styles-start[]
224
224
[.collapsible-list]
225
225
== Style Variants
226
226
227
227
The following style variants can be applied:
228
-
// end::styles-intro[]
229
228
229
+
[cols="1,3,1"]
230
+
|===
231
+
| Variant | Description | Supported by
232
+
233
+
// end::styles-start[]
230
234
231
235
// tag::text-alignment[]
232
-
[#text-alignment]
233
-
.Text Alignment
234
-
[%collapsible]
235
-
====
236
-
Three different text alignments are supported: `left`, which is the default; `center`; and `right`.
236
+
|`align-left`
237
+
|Aligns the text to the left side of the field (default)
238
+
|Aura, Lumo
237
239
238
-
Right-alignment is recommended for numerical values when presented in vertical groups. This tends to aid interpretation and comparison of values.
239
-
====
240
-
// end::text-alignment[]
240
+
|`align-center`
241
+
|Centers the text within the field
242
+
|Lumo
243
+
244
+
|`align-right`
245
+
|Aligns the text to the right side of the field. Recommended for numerical values when presented in vertical groups.
246
+
|Aura, Lumo
241
247
248
+
|`align-start`
249
+
|Aligns the text to the start side of the field, taking into account the current text direction (left for LTR, right for RTL)
250
+
|Aura
251
+
252
+
|`align-end`
253
+
|Aligns the text to the end side of the field, taking into account the current text direction (right for LTR, left for RTL)
254
+
|Aura
255
+
256
+
// end::text-alignment[]
242
257
243
258
// tag::small-variant[]
244
-
[#small-variant]
245
-
.Small Variant
246
-
[%collapsible]
247
-
====
248
-
The small variant can be used to make individual fields more compact. The default size of fields can be customized with <<{articles}/components/themes/lumo/lumo-style-properties#,style properties>>.
249
-
====
250
-
// end::small-variant[]
259
+
|`small`
260
+
|Renders a more compact field
261
+
|Lumo
251
262
263
+
// end::small-variant[]
252
264
253
265
// tag::helper-above-field[]
254
-
[#helper-above-field]
255
-
.Helper Above Field
256
-
[%collapsible]
257
-
====
258
-
The helper can be rendered above the field, and below the label.
259
-
====
260
-
// end::helper-above-field[]
266
+
|`helper-above-field`
267
+
|Renders the helper above the field, and below the label
268
+
|Aura, Lumo
261
269
270
+
// end::helper-above-field[]
262
271
263
-
// tag::borders[]
264
-
[#borders]
265
-
.Borders
266
-
[%collapsible]
267
-
====
268
-
Borders can be applied to the field surface by providing a value (e.g., `1px`) to the `--vaadin-input-field-border-width` CSS property. This can be applied globally to all input fields using the `html` selector, or to individual component instances. Borders are required to achieve https://www.w3.org/TR/WCAG21/#non-text-contrast[WCAG 2.1 level AA] conformant color contrast with the default Lumo styling of fields.
269
-
270
-
You can override the default border color with the `--vaadin-input-field-border-color` property.
0 commit comments