Allows users to enter a single line of text.
Use a text box when the user needs to enter a single line of text, such as a name or email address. Every text box must have a label. If the field is required, show an asterisk (*) next to the label.
You can include optional guidance text to help users understand what to enter. If the guidance is longer than a short sentence, use a guidance accordion instead.
Choose the appropriate input type in the HTML to help with accessibility, validation and the right on-screen keyboard on touch-screen devices.
Do:
Avoid:
Are you sure you want to close without saving?
Any changes made will not be saved!