Skip to content

Search Feitio

↵ opens the first↑↓ chooseEsc closes

Field

A field’s label, hint, control and error, always in the same order and spacing.

On this page

Playground

Hint
State
Background
HTML
<div class="feitio-field"><label class="feitio-label" for="pg-name">Reminder name</label><input class="feitio-input" id="pg-name"></div>

When to use

When not to use

Examples

Reminder nameShows in the notificationWrite a name

A complete field

Label on top, the hint right under it, the control, and the error below the control. All at space-1.

Show code
HTML
<div class="feitio-field">
  <label class="feitio-label" for="nome">Nome do lembrete</label>
  <span class="feitio-hint" id="nome-dica">Aparece na notificação</span>
  <input class="feitio-input" id="nome" aria-describedby="nome-dica nome-erro" aria-invalid="true">
  <span class="feitio-error-message" id="nome-erro">…Escreva um nome</span>
</div>

Placeholder text

Anatomy

Reminder nameShows in the notificationWrite a name
  1. Label: always visible, on top.
  2. Hint, optional: right under the label.
  3. Control: as wide as the answer.
  4. Error: below the control, with icon and word.

Writing

Accessibility

Attributes

AttributeValuesWhat for
class="feitio-field"aroundLabel, hint, control and error at space-1.
class="feitio-label"on the <label>The label, always visible.
class="feitio-hint"optionalThe hint, right after the label.
class="feitio-error-message"when there is an errorBelow the control, with icon and word.
Top