Components

Helper text

Helper text is used with form elements to give the user context about their usage. Types of helper text include block helper text, inline helper text, and placeholder text.

Types

Block helper text

Block helper text appears directly beneath a form label. Use it to explain why a piece of information is being requested, address security and privacy concerns, or to suggest ways of providing answers other than providing formatting examples.

HTML code snippet

<label class="a-label a-label--heading" for="helper-block-example">
Label
    <small class="a-label__helper a-label__helper--block">Use block helper text for instructions</small>
</label>

<input class="a-text-input" type="text" id="helper-block-example">

Inline helper text

Inline helper text appears directly after a form label. Use it to indicate whether a field is optional. See the behavior section for more information.

HTML code snippet

<label class="a-label a-label--heading" for="helper-inline-example">
 Label <small class="a-label__helper">(optional)</small>
</label>

<input class="a-text-input" type="text" id="helper-inline-example">

Placeholder text

Placeholder text appears within a text input field, and disappears once a user begins typing in that field. Use it for formatting examples only.

HTML code snippet

<label class="a-label a-label--heading" for="textinput-example-email-default">
    Email address
</label>
<input class="a-text-input"
      type="text"
      id="textinput-example-email-default"
      placeholder="email@example.com">

Latest Updates

Page last edited:
Show all details
Edit page