Skip to content

Input Field

The Input Field component is a fundamental UI element that allows users to enter, edit, and interact with single-line text data. It is the primary vehicle for data collection in forms and search interfaces.

This component is fully responsive and intentionally designed to be used across all viewports — mobile, tablet and desktop — with no alternative versions required.

Use the Input Field when:

  • You need to collect short-form data (e.g., Name, Email, Password).
  • The expected input is a single line of text.

Do not use the Input Field when:

  • Long-form text is required — use a Textarea instead.
  • There are limited pre-defined choices — use a Dropdown, Radio Group, or Checkbox.
  • Collecting dates or numbers — use specialised inputs to leverage native mobile keyboards and validation.

Quick summary of accessibility & consistency

Section titled “Quick summary of accessibility & consistency”

Consistency in input fields reduces cognitive load. Every input must have a visible label and a clear focus indicator to remain accessible.

Use native HTML elements whenever possible, maintain proper focus order, and provide clear visual feedback for interactive states. Make sure text and icons meet minimum contrast ratios, and that all actions can be performed using a keyboard alone.

We follow WCAG 2.1 Level AA standards to ensure that all users, regardless of ability, can navigate and complete our forms.

Has Required

Required
Default: true

Has Helper Text

Helper Text
Default: true

Has Helper Icon

Helper Icon
Default: true

Has Icon

Icon Container
Default: false

Yes

Input field
Background color:
color-surface-neutral-default#ffffff
color-surface-neutral-default#ffffff
Border color:
color-border-neutral-default#282830
color-border-neutral-default#282830
Input field
Width: 347
Border radius: 0
Label
Text color:
color-foreground-neutral-subtle#4d4d4d
color-foreground-neutral-subtle#6c7073
Text style: Body/8-default
Input Text
Text color:
color-foreground-neutral-default#333333
color-foreground-neutral-default#282830
Text style: Body/6-default

No

Input field
Background color:
color-surface-neutral-default#ffffff
color-surface-neutral-default#ffffff
Border color:
color-border-neutral-default#282830
color-border-neutral-default#282830
Label
Text style: Body/6-default
Required
Height: 24
Text style: Body/6-default

Yes

Input field
Background color:
color-surface-neutral-default#ffffff
color-surface-neutral-default#ffffff
Border color:
color-border-neutral-muted#a8aaac
color-border-neutral-muted#a8aaac
Label
Text style: Body/8-default
Required
Height: 18

No

Input field
Background color:
color-background-neutral-default#ffffff
color-background-neutral-default#ffffff
Label
Text style: Body/6-default
Required
Height: 24

Yes

Input field
Background color:
color-fill-contrast-default#d4d2d1
color-fill-contrast-default#e4e4e4
Border color:
color-border-neutral-muted#a8aaac
color-border-neutral-muted#a8aaac
Label
Text style: Body/8-default
Required
Height: 18
Input Text
Text color:
color-foreground-neutral-subtle#4d4d4d
color-foreground-neutral-subtle#6c7073

No

Label
Text color:
color-foreground-neutral-subtle#4d4d4d
color-foreground-neutral-subtle#6c7073
Text style: Body/6-default
Required
Height: 24

Yes

Input field
Border color:
color-border-focus-neutral-default#0072f0
color-border-focus-neutral-default#0072f0
Border weight: 2
Border radius: 1

Yes

Input field
Background color:
color-fill-neutral-muted#f5f5f5
color-fill-neutral-muted#a8aaac
Border color:
color-border-neutral-muted#a8aaac
color-border-neutral-muted#a8aaac
Label
Text color:
color-foreground-neutral-default#333333
color-foreground-neutral-default#282830
Text style: Body/8-emphasis
Required
Height: 18
Text style: Body/8-default
Input Text
Text style: Body/6-emphasis

No

Label
Text color:
color-foreground-neutral-default#333333
color-foreground-neutral-default#282830
Text style: Body/6-emphasis
Required
Height: 24

Yes

Label
Text color:
color-foreground-neutral-subtle#4d4d4d
color-foreground-neutral-subtle#6c7073
Text style: Body/8-default
Required
Height: 18
Text style: Body/8-default
Input field
Width: 343
Input field
Border color:
color-border-error-default#cc0000
color-border-error-default#cc0000

No

Label
Text color:
color-foreground-neutral-default#333333
color-foreground-neutral-default#282830
Text style: Body/6-default
Required
Height: 24
Text style: Body/6-default
Input field
Width: 343

Yes

Input field
Border color:
color-border-neutral-muted#a8aaac
color-border-neutral-muted#a8aaac
  • Dynamic width and containment — Input width should be defined based on expected content length. Content must never expand the physical boundaries of the container, which acts as a rigid mask.
  • Overflow logic — On active status: horizontal scrolling (single-line, auto-scroll left, cursor stays visible) with masking (“clip” behaviour). On rested status: ellipsis.
NameApplied asApplied to
color-fill-error-default
Text colorRequired
color-fill-error-default
Text colorRequired
color-foreground-error-default
Text colorError message
color-foreground-error-default
Text colorError message
color-foreground-neutral-default
Text colorInput Text (Active)
color-foreground-neutral-default
Text colorInput Text (Active)
color-foreground-neutral-subtle
Text colorLabel, Success message
color-foreground-neutral-subtle
Text colorLabel, Success message
color-surface-neutral-default
Background colorInput field
color-surface-neutral-default
Background colorInput field
color-background-neutral-default
Background colorInput field (unfilled)
color-background-neutral-default
Background colorInput field (unfilled)
color-fill-contrast-default
Background colorInput field (hover)
color-fill-contrast-default
Background colorInput field (hover)
color-fill-neutral-muted
Background colorInput field (disabled)
color-fill-neutral-muted
Background colorInput field (disabled)
color-border-neutral-default
Border colorInput field
color-border-neutral-default
Border colorInput field
color-border-neutral-muted
Border colorInput field
color-border-neutral-muted
Border colorInput field
color-border-focus-neutral-default
Border colorInput field (focused)
color-border-focus-neutral-default
Border colorInput field (focused)
color-border-error-default
Border colorInput field (error)
color-border-error-default
Border colorInput field (error)
NameApplied asApplied to
Lorem Ipsum
typography-body-6
Text styleInput Text (Active)
Lorem Ipsum
typography-body-6
Text styleInput Text (Active)
Lorem Ipsum
typography-body-6 (emphasis)
Text styleInput Text (Disabled)
Lorem Ipsum
typography-body-6 (emphasis)
Text styleInput Text (Disabled)
Lorem Ipsum
typography-body-8
Text styleLabel
Lorem Ipsum
typography-body-8
Text styleLabel
Lorem Ipsum
typography-body-8 (emphasis)
Text styleHelper Text, Error message, Success message
Lorem Ipsum
typography-body-8 (emphasis)
Text styleHelper Text, Error message, Success message
  • Maintain accessible contrast across all states.
  • Focus styles must meet WCAG AA contrast requirements and be clearly distinguishable from hover.
  • Use semantic colour tokens (e.g., foreground/neutral/default) rather than fixed values to ensure the component adapts correctly to different themes or surfaces.

To ensure the Input Field meets WCAG 2.1 AA and supports assistive technologies, follow these implementation standards:

  1. Focus and Blur
    • Inputs must display a visible focus style — not only a colour change.
    • Activation gives keyboard control. Blur deactivates the input.
  2. No keyboard traps
    • Users must always be able to Tab / Shift+Tab away from the input.
  3. Screen Reader Order
    • Label → Status (if Disabled/Error) → Helper (if exists) → Activates field.
  4. Responsive Tap Targets
    • Interactive area must be at least 44 px in height to support touch accessibility.
Guidance on how to use a component.
  • Provide a clear, concise label above the input.
  • Provide format hint examples in the helper text.
  • Group related inputs logically (reference the “Form section” component).
Guidance on what to avoid when using a component.
  • Don’t hide the label while the user is typing.
  • Don’t use Error states prematurely — wait for blur.
  • Don’t rely on colour alone for Error/Positive states — always include an icon or helper text.