Precise amounts
Integer or decimal amounts, currency prefixes and a configurable step.
Shared input design
The same input presentation, sizes, rounding and appearance variants as Flex Text Input.
Quick example
['min' => 100, 'max' => 2000]. Without an explicit default, a new field starts with its full configured range. An optional field may also store null.
Bounds, steps and decimal amounts
min() and max() must be finite numbers, with the maximum greater than the minimum. step() must be positive. Steps start at the configured minimum; for min(5)->step(10), valid values include 5, 15 and 25. The maximum endpoint remains selectable even when the last step is shorter.
Integer mode is enabled by default and requires integer bounds and steps. Disable it for cents or other fractions:
decimalPlaces() accepts 0–10 or null. Your precision must represent the configured bounds and step. Without a fixed precision, snapping supports up to ten decimal places. Numeric values must remain within JavaScript’s safe numeric range; do not use this field for arbitrary-precision monetary calculations.
locale() formats the accessible value announcement. The editable native number inputs retain their browser’s numeric editing behavior; the stored value always contains numbers, without currency symbols or grouping separators.
Input appearance
- Variants
- Sizes and rounding
- Labels and prefixes
primary uses the standard bordered input, secondary uses the shared secondary background, and flat removes the input chrome. Legacy bordered and faded names map to primary and secondary.Histogram
Supply a list of heights. Heights are clamped to8–100, with at most 1024 source bars. Invalid shapes and nonfinite heights are rejected. CSS container queries choose the displayed density from the available width, in groups of eight bars and up to 128 visible bars. Each density resamples the whole source distribution. This works before JavaScript starts and on resize, so activation does not change bar thickness.
Slider without amount inputs
Editing and events
- Dragging previews the range locally and commits one complete
min/maxpair on release. - Handles cannot pass one another. Typing a minimum above the maximum raises the maximum; typing a maximum below the minimum lowers the minimum.
- Amounts commit on change, blur or Enter. This lets users finish typing before snapping and updating the range.
- Escape, pointer cancellation, loss of pointer capture or window focus cancels an unfinished drag.
- Arrow keys change one step; Shift multiplies it by ten. Page Up/Down move ten steps. Home/End move toward the available endpoints, respecting the other handle.
- Horizontal arrow keys and handle positions follow RTL direction.
- Reduced-motion preferences disable local transitions.
input events during drag previews and change when a different pair is committed. Both contain { min, max } in event.detail. A preview event does not mean the persisted form state has been committed.
Server validation and storage
Submission checks the exactmin/max object shape, finite numeric endpoints, configured bounds, integer/decimal policy, step alignment and min <= max. Additional keys, missing endpoints, booleans, nested objects and invalid numeric strings are rejected. Valid numeric strings become numbers. Invalid submitted values are not silently clamped into valid ones.
readOnly() prevents editing but still validates submitted values. For a calculated display that must not be saved, use dehydrated(false). Disabled fields follow Filament’s normal disabled/dehydration policy.
Configuration reference
Configuration methods support closures with Filament utility injection unless noted.
Standard Filament methods such as
label(), default(), required(), disabled(), rules(), live(), helperText() and columnSpanFull() remain available.
FLEX schema configuration
The schema field type isprice_range. Its supported component keys are min, max, step, size, variant, rounding, prefix, histogram, integer, decimal_places, show_inputs, min_input_label, max_input_label, locale, focus_outline and read_only, together with shared schema settings. read_only maps to readOnly() for schema-built fields.
Related components
FlexSlider
A general slider with optional range selection.
TrackSlider
A compact single-value control.
CurrencyField
An individual amount input.