@fusion.dev/helix-docs 0.233.0 → 0.235.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/content/forms.mdx CHANGED
@@ -216,3 +216,33 @@ returns to. In a form, that is usually what you mean by a starting value:
216
216
  ```
217
217
 
218
218
  See [State and control](./state-and-control).
219
+
220
+ ## Choose what the browser offers in a field
221
+
222
+ Every control you type into takes `autocomplete` and passes it to the text box
223
+ it draws. Set a token from the HTML standard, and the browser offers the
224
+ matching value from what it knows about the reader:
225
+
226
+ ```html
227
+ <helix-input
228
+ autocomplete="email"
229
+ label="Email"
230
+ name="email"
231
+ ></helix-input>
232
+ <helix-pin-input
233
+ autocomplete="one-time-code"
234
+ label="Code"
235
+ ></helix-pin-input>
236
+ ```
237
+
238
+ Each control starts from the value that suits it:
239
+
240
+ - Number Input, Date Input, Time Input, Filter Input, Combobox, and Color Input
241
+ start at `off`. A browser's form history for these is text typed into other
242
+ fields, and a filter or a combobox offers its own list.
243
+ - Pin Input starts at `one-time-code`, so a phone offers the code it was sent.
244
+ - Input and Textarea leave the attribute off, so the browser offers what it
245
+ usually does.
246
+
247
+ To leave the attribute off on any control, set `autocomplete` to an empty
248
+ string.