Components

Input

Inputs take a short line of text. In Flint, an input always lives in a form field with a visible label, optional helper text and an error message.

Example

Light

Shown on your trip card.
Enter a number from 1 to 14.

Dark

Shown on your trip card.
Enter a number from 1 to 14.

When to use

  • Use an input for short, free text: names, numbers, codes.
  • Use a select or radio buttons when the answer comes from a short, known list.

Variants and states

Variant or stateUse
DefaultEmpty, with a visible label above it.
FilledHolds a value.
ErrorThe value has a problem. The edge turns red and the message replaces the helper text.
DisabledCan't be edited right now.

Guidance

Do

Keep a visible label above every input.

Don't

Use placeholder text as the label. It disappears when people start typing.

Do

Say what went wrong and how to fix it: "Enter a number from 1 to 14."

Don't

Write "Invalid input" and leave people to guess.

Do

On submit, move focus to the first field with an error.

Don't

Show errors only at the top of the page, far from the fields.