# NumberInput

Source: https://lumeo.nativ.sh/components/number-input

# NumberInput

A numeric input with increment/decrement buttons.

## Installation

.NET CLI PackageReference Lumeo CLI

dotnet add package Lumeo

One-time app setup (`AddLumeo()`, CSS & JS) is covered in the [installation guide](docs/introduction).

## Usage

@using Lumeo

<NumberInput />

## When to Use

-   Quantity selectors in shopping carts or inventory forms
-   Numeric settings such as font size, zoom level, or timeout values
-   Price inputs requiring precise decimal control
-   Any field where users should increment or decrement a number in defined steps

Preview Code

Basic

Preview Code

Min / Max / Step

Value: 50 (0-100, step 5)

Preview Code

Precision

Preview Code

Disabled

Preview Code

Step & Precision

Step:

0.1 0.5 1 5 10

Precision:

0 1 2 3

Adjust the step size and decimal precision interactively.

## API Reference

Property

Type

Default

Description

Value

double?

null

Current numeric value.

Min

double?

null

Minimum allowed value.

Max

double?

null

Maximum allowed value.

Step

double

1

Increment/decrement step size.

Precision

int?

null

Decimal places for display.

Disabled

bool

false

Disable the input.

ValueChanged

EventCallback<double?>

—

Two-way binding callback; fires when the value changes.

Prefix

string?

null

Text rendered before the number (e.g., "$").

Suffix

string?

null

Text rendered after the number (e.g., "kg").

Culture

CultureInfo?

null

Culture used for parsing and formatting the number. Defaults to the current culture.

UseMouseWheel

bool

false

When true, scrolling the mouse wheel over the input adjusts the value by Step.

Required

bool

false

Marks the field as required. Syncs with a parent FormField.

Invalid

bool

false

Applies error styling. Syncs with a parent FormField.

ErrorText

string?

null

Error message displayed below the field when Invalid is true.

HelperText

string?

null

Helper text shown below the field when not invalid.

Label

string?

null

Label rendered above the field (standalone, without FormField).

Name

string?

null

HTML name attribute for form submission.

FormField

FormField.FormFieldContext?

null

Cascaded context from a parent FormField; wires label, validation, and required state automatically.

## Related Components

-   [Input](/components/input) — General-purpose text input for free-form values
-   [Slider](/components/slider) — Visual range selection when exact precision is less important
-   [Form](/components/form) — Wrap NumberInput with validation and labels in form layouts
