Skip to main content
← Back to Table of Contents

Summary

Pill-shaped numeric control with − / + buttons and an animated NumberFlow display. Ideal for quantities, guests, or any numeric input where precise stepping is preferred over direct text entry. Works with all standard Filament field APIs: required(), disabled(), hidden(), live(), afterStateUpdated(), validation rules, etc.

Basic usage

Standard Quantity

Currency Input


State & validation

Stored value

State is a numeric value (int or float) or null if nullable.

Validation rules (built-in)


Configuration API

All methods accept Closure unless noted.

Real-world examples

Long unit labels

The control sizes itself to the number and unit. Long labels are supported in all three sizes, including the change from two to three digits. Number and unit are vertically centered in both the initial server-rendered view and the animated view. The playground includes reservation/reservations in sm, md and lg for comparison.

Animated singular and plural units

The unit changes locally with the number; it does not need a server request for each click. Unchanged letters stay in place while added or removed characters animate. A static suffix('items') retains the same text for every value. When forms are configured, they take precedence over the static suffix. Use the plural categories appropriate for your language:
Supported categories are zero, one, two, few, many and other. Omitted categories use other. PHP uses its internationalization extension for localized plural selection; the browser uses its built-in plural rules. Configure the same locale for both. Without the PHP internationalization extension, server rendering uses a singular/plural fallback.

Boundary feedback and nullable values

At a configured minimum or maximum, another press gives a short spring response: downward at the minimum and upward at the maximum. Repeated presses increase the response within a small cap. The value remains unchanged and no update is submitted for a refused step. A disabled field does not respond.
In nullable mode, decrementing at the minimum selects null; incrementing from null selects the minimum (or the step when no minimum is configured). This is a valid state change, so it does not produce the minimum-boundary response. Users who prefer reduced motion receive immediate changes. Use wheelAnimated(false) to disable the component’s animations explicitly.

Debounced server updates

The displayed number changes immediately. Rapid clicks are grouped into one server update after the configured pause. Without live(), the form still submits the current value normally. Use validated form state when saving; client-side bounds do not replace server validation.

Keyboard control

Focus the value and use Arrow Up / Arrow Down to step, Home to select the configured minimum, and End to select the configured maximum. Buttons also work with Enter and Space. Direct text entry remains disabled; use FlexTextInput when users need to type numbers.

Custom icons and reversed controls

reversed() swaps the buttons without changing their meaning or keyboard directions. Icon configuration accepts icon names, backed enums or rendered icon HTML. Individual decrementIcon() and incrementIcon() settings can be used instead of icons().

Sizes and surfaces

Choose sm, md or lg and default, primary, secondary, tertiary or outline. disabled() disables the whole control; the original sizes and surfaces work in light and dark mode.

Guest Selection (Wizard)

Reactive Price Calculator


Playground

/admin/flex-fields/number-stepper See Playground for setup.

CSS classes (reference)

Last modified on October 16, 2026