Skip to main contentCarbon Design System

Number input


Inputs come in two different colors. The default input color is $field-01 and is used on $ui-background and $ui-02 page backgrounds. The --light version input color is $field-02 and is used on $ui-01 page backgrounds.

ClassPropertyColor token
.bx--labeltext color$text-02
.bx--number input[type='number']text color$text-01
.bx--number__controlssvg color$icon-01
Number input example

Number input example

Interactive states

ClassPropertyColor token
.bx--form-requirementtext color$support-01
.bx--label:disabledtext color$disabled-02
.bx--number input[type='number']:disabledtext color$disabled-03

Active: Number input should have a default number to start. The input should never be empty.

Helper text: Helper text appears below the label when the input is active. Helper text remains visible while the input is focused and disappears after focus away.

Error: Error messages appear below the input field and are always present while invalid.

Disabled: Disabled state should have a .not-allowed cursor on hover.


Number input labels should use sentence case, with only the first word in a phrase and any proper nouns capitalized.

ClassFont-size (px/rem)Font-weightType token
.bx--label12 / 0.75Regular / 400$label-01
.bx--number input[type='number']14 / 0.875Regular / 400$body-short-01
.bx--form-requirement12 / 0.75Regular / 400$label-01


The height varies for small (32/2), medium (40/2.5), and large (48/3) size variants. The width varies based on content, layout, and design. The add and subtract icons can be found in the icons library.

ClassPropertypx / remSpacing token
.bx--labelmargin-bottom8 / 0.5$spacing-03
.bx--number inputheight40 / 2.5
.bx--number input[type='number']padding-left16 / 1$spacing-05
.bx--number__controlspadding-left, padding-right16 / 1$spacing-05
Structure and spacing for number input

Structure and spacing measurements for a number input | px / rem