@@ -13,6 +13,31 @@ The following Angular Material components are designed to work inside a `<mat-fo
1313
1414<!-- example(form-field-overview) -->
1515
16+ ### Form field appearance variants
17+ The ` mat-form-field ` supports 4 different appearance variants which can be set via the ` appearance `
18+ input. The ` legacy ` appearance is the default style that the ` mat-form-field ` has traditionally had.
19+ It shows the input box with an underline underneath it. The ` standard ` appearance is a slightly
20+ updated version of the ` legacy ` appearance that has spacing that is more consistent with the ` fill `
21+ and ` outline ` appearances. The ` fill ` appearance displays the form field with a filled background
22+ box in addition to the underline. Finally the ` outline ` appearance shows the form field with a
23+ border all the way around, not just an underline.
24+
25+ There are a couple differences to be aware of between the ` legacy ` appearance and the newer
26+ ` standard ` , ` fill ` , and ` outline ` appearances. The ` matPrefix ` and ` matSuffix ` elements are center
27+ aligned by default for the newer appearances. The Material Design spec shows this as being the
28+ standard way to align prefix and suffix icons in the newer appearance variants. We do not recommend
29+ using text prefix and suffixes in the new variants because the label and input do not have the same
30+ alignment. It is therefore impossible to align the prefix or suffix in a way that looks good when
31+ compared with both the label and input text.
32+
33+ The second important difference is that the ` standard ` , ` fill ` , and ` outline ` appearances do not
34+ promote placeholders to labels. For the ` legacy ` appearance specifying
35+ ` <input placeholder="placeholder"> ` will result in a floating label being added to the
36+ ` mat-form-field ` . For the newer variants it will just add a normal placeholder to the input. If you
37+ want a floating label, add a ` <mat-label> ` to the ` mat-form-filed ` .
38+
39+ <!-- example(form-field-appearance) -->
40+
1641### Floating label
1742
1843The floating label is a text label displayed on top of the form field control when
0 commit comments