@@ -120,8 +120,26 @@ export abstract class TextField extends textFieldBaseClass {
120
120
*/
121
121
@property ( { attribute : 'error-text' } ) errorText = '' ;
122
122
123
+ /**
124
+ * The floating Material label of the textfield component. It informs the user
125
+ * about what information is requested for a text field. It is aligned with
126
+ * the input text, is always visible, and it floats when focused or when text
127
+ * is entered into the textfield. This label also sets accessibilty labels,
128
+ * but the accessible label is overriden by `aria-label`.
129
+ *
130
+ * Learn more about floating labels from the Material Design guidelines:
131
+ * https://m3.material.io/components/text-fields/guidelines
132
+ */
123
133
@property ( ) label = '' ;
124
134
135
+ /**
136
+ * Indicates that the user must specify a value for the input before the
137
+ * owning form can be submitted and will render an error state when
138
+ * `reportValidity()` is invoked when value is empty. Additionally the
139
+ * floating label will render an asterisk `"*"` when true.
140
+ *
141
+ * https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required
142
+ */
125
143
@property ( { type : Boolean , reflect : true } ) required = false ;
126
144
127
145
/**
@@ -216,6 +234,14 @@ export abstract class TextField extends textFieldBaseClass {
216
234
*/
217
235
@property ( ) pattern = '' ;
218
236
237
+ /**
238
+ * Defines the text displayed in the textfield when it has no value. Provides
239
+ * a brief hint to the user as to the expected type of data that should be
240
+ * entered into the control. Unlike `label`, the placeholder is not visible
241
+ * and does not float when the textfield has a value.
242
+ *
243
+ * https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/placeholder
244
+ */
219
245
@property ( { reflect : true , converter : stringConverter } ) placeholder = '' ;
220
246
221
247
/**
0 commit comments