---
title: "Number field"
description: "Use the number field to allow a user to input numerical values."
sidebar_label: "Number field"
slug: /reference/components/number-field
---

import ComponentDemo from '@site/src/components/ComponentDemo';

# Number field

Use the number field to allow a user to input numerical values.

**Package:** `@terreno/ui`  
**Categories:** Component  
**Props interface:** `NumberFieldProps`  
**Story source:** [`demo/stories/Numberfield.stories.tsx`](https://github.com/flourishhealth/terreno/blob/master/demo/stories/Numberfield.stories.tsx)

## Live demo

<ComponentDemo name="Number field" />

## Props

| Prop | Type | Required | Description |
| --- | --- | --- | --- |
| `onChange` | `OnChangeCallback` | Yes |  |
| `type` | `union` | Yes |  |
| `blurOnSubmit` | `boolean` |  |  |
| `disabled` | `boolean` |  |  |
| `errorText` | `string` |  |  |
| `helperText` | `string` |  |  |
| `iconName` | `IconName` |  |  |
| `id` | `string` |  |  |
| `max` | `number` |  |  |
| `min` | `number` |  |  |
| `onBlur` | `OnChangeCallback` |  |  |
| `onEnter` | `reflection` |  |  |
| `onFocus` | `reflection` |  |  |
| `onIconClick` | `reflection` |  |  |
| `onSubmitEditing` | `reflection` |  |  |
| `placeholder` | `string` |  |  |
| `testID` | `string` |  | Root test id for the primary interactive element or container. |
| `testIDs` | `FieldTestIDs` |  |  |
| `title` | `string` |  |  |
| `value` | `string` |  |  |
