Skip to main content

Number Field

Capture numeric input with increment & decrement controls, built on Base UI.

View as Markdown

Installation

Component API

PropTypeDefaultDescription
labelstring-
descriptionstring-A line under the control, for context on what the number means.
A line under the control, for context on what the number means.
errorstring-
successstring-Green border & this message in place of description.
Green border & this message in place of description.
defaultValuenumber-
minnumber-
maxnumber-
stepnumber1Amount each click of increment or decrement changes the value by.
Amount each click of increment or decrement changes the value by.
sizesm | md | lgmd
shapenone | rounded | pillrounded
disabledbooleanfalseBlocks interaction and dims the whole control, label included.
Blocks interaction and dims the whole control, label included.
requiredbooleanfalseAppends a red asterisk to the label & sets the input's native required attribute.
Appends a red asterisk to the label & sets the input's native required attribute.
animatedbooleantrue
classNamestring-
focusboolean | stringtrue