Text input

figma:ready
react:ready
scss:ready
freemarker:ready
vue:ready
webComponent:ready

Anatomy

Medium

spec visual medium

Small

spec visual small

Properties

CSS Tokens : layout / sizes

Size namePaddingsFont-sizeLine-heightradius
Small8px (mu050)size.font.04 (14px)size.line.04.l (22px)radius.m (4px)
Medium (Default size)12px (mu075)size.font.05 (16px)size.line.05.l (24px)radius.m (4px)

CSS Tokens : state colors

You must always use the tokens, the colors are only there for that information.

StatePropertyTokenColor
Defaultbackgroundcolor.input.background#ffffff
Defaultborder-colorcolor.input.border#6f676c
Defaultcolorcolor.input.text#222020
Hoverborder-colorcolor.input.hover.border#222020
Focusborder-colorcolor.input.focus.border#25a8d0
Validborder-colorcolor.input.valid.border#78be20
Valid & Hoverborder-colorcolor.input.valid.hover.border#0a601b
Invalidborder-colorcolor.input.invalid.border#df382b
Invalid & Hoverborder-colorcolor.input.invalid.hover.border#641b21
Disabledbackgroundcolor.input.disabled.background#eeeef0
Disabledborder-colorcolor.input.disabled.border#a19ba2

When disabled, an input field can never display any other state styles, and should not respond to any user interaction other than showing the related disabled cursor when user is overing.

Supported input types

  • text
  • email
  • date
  • password
  • number
  • tel
  • number
  • search

Note that if you try to apply those CSS classes to an unsupported input type. It could work but you should find something which better suits to your needs in the documentation.