Skip to content

Number Input

The NumberInput component handles numeric input, providing options for styling via themes and sizes. It also offers options for adding stepper controls, captions, suffixes, tooltips, and error or warning text for the field.

Playground

Min / Max limits

Positive and negative values

With suffix

With tooltip

tooltipContent is used to display the content of the tooltip. tooltipProps is used to pass additional props to the tooltip.

Installation

import { NumberInput } from '@harnessio/ui/components'
// ..
return (
<NumberInput
integerOnly
label="Quantity"
placeholder="Enter a number"
min={0}
max={100}
defaultValue={1}
onChange={(e) => handleQuantityChange(e.target.value)}
/>
)