Skip to content
Sections
Fiesta

field-text

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.

One labelled text input. The required marker's star is aria-hidden; the input's required attribute is the programmatic signal.

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="ft_bare">Title</label>
  <input rst-input id="ft_bare" name="ft_bare" type="text">
</div>

With a hint

Preview

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

<div rst-field>
  <label rst-field-label for="ft_hint">Headline</label>
  <input rst-input id="ft_hint" name="ft_hint" type="text" aria-describedby="ft_hint-hint">
  <small rst-field-hint id="ft_hint-hint">Shown in the list.</small>
</div>

Required

Preview

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

<div rst-field>
  <label rst-field-label for="ft_required">Display name <span rst-field-required aria-hidden="true">*</span></label>
  <input rst-input id="ft_required" name="ft_required" type="text" autocomplete="nickname" required>
</div>

With an error

Preview

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

<div rst-field>
  <label rst-field-label for="ft_error">Title</label>
  <input rst-input id="ft_error" name="ft_error" type="text" value="Release notes" aria-invalid="true" aria-describedby="ft_error-error">
  <small rst-field-error id="ft_error-error">A post with that title already exists.</small>
</div>

The headline field

Give the main field of a form, a title or a name, rst-input="primary" for a more prominent input.

Preview

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

<div rst-field>
  <label rst-field-label for="ft_primary">What is it?</label>
  <input rst-input="primary" id="ft_primary" name="ft_primary" type="text" value="Quarterly board meeting">
</div>