Skip to content
ghostui

Number field

A numeric input element with increment and decrement buttons, and a scrub area.

Preview

Installation

Install the local ghost-kit source bundle while the registry runs at localhost:3110. It contains this component and its source dependencies. Prepare the local registry first so token dependencies also resolve locally.

Install

Basic usage

Use the exported component in the composition shown above. Keep labels, data, and callbacks in the consuming application.

Structure

Examples

Variants

Ghost

Remove the outer border when the surrounding surface already groups the control. The accent border marks the focused field.

Controls at the end

Put the value first and both step buttons after it. The value aligns to the start.

Optional value

Start empty when the quantity is optional. The first increase selects the minimum.

Invalid range

Keep the typed value visible and show the allowed range so it can be corrected.

Use a value from 1 to 8.

Disabled

Show a value that cannot be changed in this step.

Read-only

Expose a value for review while keeping direct entry and step actions unavailable.

Stepped boundaries

Use a step of two and keep both controls bounded at zero and ten.

API reference

This component wraps Base UI number-field for its behavior.