Developer Programs

Learn

Docs

Text Input

Components > Editing Data > Text Input
Use this component to...
Prompt the user for a text value

Overview

Use the text input component to prompt the user to enter a text value.

Text input

Development

Web component development

Component reference

text input
text input

Allow the user to enter a text value

View the text input reference doc

Implementation

Use input type="text" when prompting for most text values.

Text input HTML
<input id="Name" formControlName="name" type="text" class="rui-form-control"
    required autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />

There are a few special input types that prompt for text values in a specific format. Use these special types in order to get the proper keyboard and/or behavior for that type of text value. These include the following:

  • Use input type="password" when prompting for a password. This hides the user’s input.
    • It can be helpful to also include a caps lock warning in any form that includes a password input, to warn the user when Caps Lock is on.
  • Use input type="tel" when prompting for a telephone number. This displays a phone number-focused keyboard in mobile environments.
  • Use input type="email" when prompting for an e-mail address. This displays an email-focused keyboard in mobile environments.
  • Otherwise use input type="text".

Angular component development

Component reference

text input
text input

Allow the user to enter a text value

View the text input reference doc

Implementation

Use input type="text" when prompting for most text values.

Text input HTML
<input id="Name" formControlName="name" type="text" class="rui-form-control"
    required autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />

There are a few special input types that prompt for text values in a specific format. Use these special types in order to get the proper keyboard and/or behavior for that type of text value. These include the following:

  • Use input type="password" when prompting for a password. This hides the user’s input.
    • It can be helpful to also include a caps lock warning in any form that includes a password input, to warn the user when Caps Lock is on.
  • Use input type="tel" when prompting for a telephone number. This displays a phone number-focused keyboard in mobile environments.
  • Use input type="email" when prompting for an e-mail address. This displays an email-focused keyboard in mobile environments.
  • Otherwise use input type="text".

Design

Figma design

Figma design info
You can find this component in the Components - Forms page in the Figma UI Kit.
Dev ComponentDesign Component Name
Text inputJHA / Forms / Text Input; set State to “Watermark” if you want to show watermark text instead of user input, otherwise leave State as “Normal”

Adobe XD design

Adobe XD design info
You can find this component in these artboards in the Adobe XD design samples:
  • Sample App - Editing Form Data
Dev ComponentDesign Component Name
Text input

JHA / Forms / Text Input

  • Select the “Watermark Text” state in the component if you want to show watermark text instead of user input.

Support options
Have questions on this topic?
Join the Responsive UI team in Microsoft Teams to connect with the community.
See something in this page that needs to change?
Send us feedback on this page.
Last updated Wed Apr 19 2023