{{> text-input-animated-src}}
The UIF inputs expect short labels that don't wrap onto the next line. This shows the preferred styling and usage of the inputs when used in a form.
| Class name | Effect | Remarks |
|---|---|---|
.form-field |
Wraps around the input tag to add space around groups of inputs |
Required. |
.form-field__label |
Added to label tag for label-specific styling. The label animation design is applied to this element if the relevant JS hook (see below) is added to the .form-field and JS runs successfully.
|
Required. |
.form-field__msg |
Used to add text below an input Used with a .has-error class on its parent to show error messages.
|
Optional. |
.form-field--space-y |
Adds vertical space to the .form-field |
Optional. |
| JavaScript hook | ||
[data-js="form-field"] |
Use this JavaScript hook on the .form-field if you wish the field to use the animated label design. Detects if an input is filled, and applies the relevant style. |
Required. |