Manage Content
Default

We'll never share this.

States

Enter a valid email address.

PropTypeDefaultRequiredDescription
labelstringNoField label, associated via a real <label>.
hintstringNoHelper text shown below the field when there is no error.
errorstringNoError message — replaces the hint and applies the error border.
requiredbooleanfalseNoShows a red asterisk next to the label.
...propsInputHTMLAttributesNoAll standard <input> props (type, value, onChange, placeholder, etc).
Do
  • Validate on blur, not on every keystroke.
  • Write a specific error message and, where possible, how to fix it.
  • Show the hint by default; replace it with the error only once validation fails.
Don't
  • Use a generic "Invalid input" error message.
  • Rely on placeholder text as a substitute for a real label.
  • Validate before the user has had a chance to finish typing.