Skip to content
Sections
Fiesta

field-url

Form The fields a person types into, in the states a real form puts them in. Each one sits in a padded rst-box, because that is the card a form goes in.

A web address field that accepts example.com with or without https://. Whatever reads the form has to add the scheme and check the address.

Each example is live, but its links go nowhere. HTML shows the markup to copy.

Bare

Preview

Put this inside <section rst-box><form rst-form>.

<div rst-field>
  <label rst-field-label for="fu_bare">Website</label>
  <input rst-input id="fu_bare" name="fu_bare" type="text" inputmode="url" autocomplete="url" autocapitalize="none" autocorrect="off" spellcheck="false">
</div>

With a hint

Preview

Put this inside <section rst-box><form rst-form>.

<div rst-field>
  <label rst-field-label for="fu_hint">Company website</label>
  <input rst-input id="fu_hint" name="fu_hint" type="text" inputmode="url" autocomplete="url" autocapitalize="none" autocorrect="off" spellcheck="false" aria-describedby="fu_hint-hint">
  <small rst-field-hint id="fu_hint-hint">You can leave off the https.</small>
</div>

With an error

Preview

Put this inside <section rst-box><form rst-form>.

<div rst-field>
  <label rst-field-label for="fu_error">Website</label>
  <input rst-input id="fu_error" name="fu_error" type="text" inputmode="url" autocomplete="url" autocapitalize="none" autocorrect="off" spellcheck="false" value="brightwater" aria-invalid="true" aria-describedby="fu_error-error">
  <small rst-field-error id="fu_error-error">Enter a web address, like example.com.</small>
</div>