Components · Form

Input

An input field lets the user enter free text, numbers or search terms. It can have a label, a left icon, right-hand action icons and a message that explains or validates the value.

Tokens, sizes, measurements, states and requirements. Values come from the live token package and from Figma: Base Input.

Design Tokens

Resolved from the live token package.

StatePartTokenValue

Figma binds icon/disabled, which is not in tokens.json, so the disabled icon uses text-disabled (same value).


Sizes

Breakpoint · sizeHeightPadding (left, right)Left iconRight iconsLabelInput text
Desktop · Large48px12px, 8px24pxButton (32px)label-md 16/16, 0.48pxbody-md 17/24, 0.32px
Desktop · Small40px8px, 4px20pxButton (32px)label-sm 14/14, 0.56pxbody-sm 14/20, 0.36px
Desktop · XSmall32px8px, 6px20pxIcon Button (20px)label-sm 14/14, 0.56pxbody-sm 14/20, 0.36px
Mobile · Large40px8px, 4px24pxButton (32px)label-sm 12/12, 0.48pxbody-md 16/22, 0.32px
Mobile · Small32px8px, 6px20pxIcon Button (20px)label-sm 12/12, 0.48pxbody-sm 14/20, 0.36px

Right-hand icons are 20px in every size, but the component that holds them differs. A Button (eco-button, Blank, icon only, 6px padding = 32px, grey fill on hover) holds them on Desktop Large, Desktop Small and Mobile Large. An Icon Button (just the 20px icon, it turns grey on hover) holds them on Desktop XSmall and Mobile Small. Icon color is text-action-primary. Padding top and bottom comes from the fixed height. The 6px values and the 10px gap before the icons on Mobile Large are literals: there is no spacing token for them.


Measurements

Dimensions

Padding of the input box at each size. The shaded areas are the padding to the left and right; the box is fixed in height, so there is no padding above or below. The numbers are read from the component.

Breakpoint
The input box at true size (1:1). Change the Breakpoint to see the mobile values.
AttributeLargeSmallXSmall
Height, Desktop48px40px32px
Height, Mobile40px32pxNot available (use Small)
Padding, left and right, Desktop12px, 8px8px, 4px8px, 6px
Padding, left and right, Mobile8px, 4px8px, 6pxNot available
Left icon24px20px20px
Gap, left icon to text8px8px8px
Border1px
CornersSquare
Divider1px × 16px

Spacing

The same padding and distances as spacing tokens.

PartValue
Label to boxspace-4
Box to messagespace-4
Padding left, Desktop Largespace-12
Padding left, Large mobile and Small, XSmallspace-8
Padding right, Desktop Largespace-8
Padding right, Small desktop and Large mobilespace-4
Padding right, XSmall and Small mobile6px: literal, no token
Gap between the icon and the textspace-8
Gap between right iconsspace-4
Gap before the right iconsLarge desktop and Small desktop space-4; Large mobile 10px (literal); XSmall, and Small mobile space-16
Focus ring2px line, 3px outside the box

States

All seven states from Figma, with and without icons. Hover and focus are forced on this page; in your code they come from :hover and keyboard focus. Active means the field has a value.

Breakpoint
Size
StatePlainLeft iconLeft + right icons

Typography

PartTypeSize / line heightLetter spacingWeight
Label, Desktop Largelabel-md16/160.48pxBold, uppercase
Label, Desktop Small, XSmalllabel-sm14/140.56pxBold, uppercase
Label, Mobilelabel-sm12/120.48pxBold, uppercase
Input text, Largebody-md16/22 mobile, 17/24 from 769px0.32pxRegular
Input text, Small, XSmallbody-sm14/200.36pxRegular
Messagebody-sm14/200.36pxRegular

Breuer Condensed with ss02 and ss03 (the message also ss06). The placeholder and the message use text-tertiary.


Structure

Elements

ElementClassNotes
Fieldform-fieldLabel, input wrapper and message in a column, 4px apart.
Labelform-label, form-label--smUppercase. --sm for Small and XSmall.
Input wrapperinput-wrapCarries the focus ring (2px, 3px outside the box).
Input boxinput-box, --sm, --xs, --error, --successBorder, fill and height. Holds the icon, the input and the right icons.
Left iconinput-icon, --lgMaterial Symbols. --lg is 24px (Large).
Inputform-inputThe native input.
Right iconsinput-actions, __btn, __clear, __dividerClear shows only while the field has a value.
Messageform-helper, --error, --success, --disabledOptional icon (input-icon).

Types

TypeLeft iconRight icons
PlainNoNo
Left iconYesNo
Left and right iconsYesClear, divider and action icons
Clear onlyOptionalClear
Actions onlyOptionalAction icons (no clear, no divider)

Width

The field fills its container.


Motion

PropertyDurationEasing
opacity of the focus ringduration-fast-3ease-standard

Behavior

InputResult
Type a valueThe field becomes Active: black border and the clear button appears.
Clear buttonEmpties the field and returns focus to it. It is a real button with an aria-label.
TabThe blue ring shows on keyboard focus only (body.keyboard-nav, set by a small script).
Hover on a right iconButton: grey fill (surface-opacity-black-05). Icon Button: the icon turns text-action-primary-hover.
DisabledNot focusable. Grey fill, light border, text-disabled for text, icons and message.

Accessibility Requirements

TopicRequirement
LabelAlways a label with for and id. Search fields without a visible label need an aria-label.
ErrorSet aria-invalid="true" and point aria-describedby at the message.
Icon buttonsReal button elements with an aria-label. The decorative icons are aria-hidden="true".
FocusA 2px ring on keyboard focus (border-focus), not on mouse click (WCAG 2.4.7, 1.4.11).
ColorError and success are not shown by color alone: the message says it, and an icon helps.
DisabledNot focusable. Disabled tokens are exempt from contrast requirements.

Open point: multi-line text fields are a separate component: see Text area.