Skip to main contentCarbon Design System

Text input

Color

ElementPropertyColor token
Labeltext color$text-secondary
Field texttext color$text-primary
Placeholder texttext color$text-placeholder
Helper texttext color$text-helper
Fieldbackground-color$field
border-bottom$border-strong
text input states

Interactive states

StateElementPropertyColor token
FocusFieldoutline$focus
InvalidFieldoutline$support-error
Error messagetext color$text-error
Warning iconsvg$support-error
DisabledFieldbackground$field-disabled
Field texttext color$disabled-02
text input interactive states

Typography

Text input labels and placeholder text should be set in sentence case, with only the first word in a phrase and any proper nouns capitalized. Text input labels should be three words or less.

ElementFont-size (px/rem)Font-weightType token
Label12 / 0.75Regular / 400$label-01
Field text14 / 0.875Regular / 400$body-long-01
Helper text12 / 0.75Regular / 400$label-01
Error message12 / 0.75Regular / 400$label-01

Structure

Text input

ElementPropertypx / remSpacing token
Labelmargin-bottom8 / 0.5$spacing-03
Helper textmargin-top4 / 0.25$spacing-02
Field textpadding-left, padding-right16 / 1$spacing-05
Fieldborder-bottom1px–
Field: focusborder2px–

Sizes
SizeElementPropertypx / rem
SmallFieldheight32 / 2
DefaultFieldheight40 / 2.5
XLFieldheight48 / 3
Structure and spacing measurements for text input

Structure and spacing measurements for text input | px / rem

Text area

ElementPropertypx / remSpacing token
Labelmargin-bottom8 / 0.5$spacing-03
Fieldheightvaries–
padding-left, padding-right16 / 1$spacing-05
padding-top, padding-bottom11 / 0.6875–
border-bottom1px–
Field: focusborder2px–
Helper textmargin-top4 / 0.25$spacing-02
Structure and spacing measurements for text area

Structure and spacing measurements for text area | px / rem