Input

Text inputs allow users to enter freeform text. They support multiple types, placeholder text, and validation states for structured data entry.

Anatomy

1 2 3
  1. 1 Container — border, background, and padding define the field area
  2. 2 Input primitive — text entry element (value or placeholder)
  3. 3 Control — trailing action button(s) based on type (clear, +/-, visibility)

Options

States

Default
Hover
Focus
Disabled

Table of options

PropertyValuesDefault
typetext / email / password / number / tel / url / searchtext
placeholdertext
valuetext
disabledtrue / falsefalse
statedefault / hover / active / focus / disableddefault

Behaviors

Text with clear control

Text-type inputs include a clear button that allows users to reset the field value in one action.

Number with increment/decrement

Number inputs show minus and plus buttons for stepping the value without typing.

Password with visibility toggle

Password inputs include a toggle button to reveal or hide the entered value.

Full width

Inputs expand to fill the available inline size of their container.

Keyboard focus

The focus state changes the border color and adds a focus ring.

Disabled state

A disabled input cannot be edited. It is removed from the tab order and uses reduced contrast.

Placeholder text

Placeholder shows a format hint. It disappears on input and is not a substitute for a label.

Usage guidelines

Always pair with a label

<label for="email">Email</label>

Do

Every input must have a visible label or an aria-label.

Don't

Don't use placeholder text as the only label.

Use the right input type

type="email"

Do

Use semantic types to enable browser validation and mobile keyboards.

type="text" for emails

Don't

Don't use type="text" when a more specific type exists.

Content standards

  • Placeholder text should show a format example, not repeat the label.
  • Keep placeholder text short — it truncates in narrow containers.
  • Error messages should identify the field, the problem, and the fix.

Keyboard interactions

KeyInteraction
TabMoves focus into or out of the input.
Any characterEnters text at the cursor position.
BackspaceDeletes the character before the cursor.
Ctrl + ASelects all text in the input.

Accessibility

  • Every input must have a programmatic label via <label>, aria-label, or aria-labelledby.
  • Placeholder text is not an accessible label — it disappears on input.
  • Disabled inputs use the native disabled attribute.
  • Error states should be communicated via aria-invalid and associated error text via aria-describedby.
  • Focus indicators meet 3:1 contrast.

Theming

Input adapts automatically across brands and color modes through component tokens. Use the hero preview switches above to see it in action.

For the full theming architecture see Foundations: Theming.

Design checklist

All interactive statesHover, active, focus, and disabled states are implemented.
All color themesWorks across light and dark modes for all brands.
Accessible use of colorColor is not the only visual means of conveying information (WCAG 1.4.1).
Accessible contrast for textText contrast ratio of at least 4.5:1 (WCAG 1.4.3).
Accessible contrast for UIUI component contrast ratio of at least 3:1 (WCAG 1.4.11).
Content standardsPlaceholder and error message guidelines are documented.
Defined optionsType, placeholder, value, disabled, and state options are documented.
Defined behaviorsFull width, focus, disabled, and placeholder behaviors are documented.
Usage guidelinesDo and don't examples for labeling and input types are included.
Keyboard interactionsTab, text entry, and selection interactions are documented.
Design tokensAll visual attributes are available as design tokens.
Figma componentComponent is available in the Figma library.