Skip to main content
PriceRangeField ← Back to Table of Contents

Summary

Dual-handle price range slider with histogram backdrop, min/max numeric inputs, and currency prefix. Example state: ['min' => 100, 'max' => 1124].

Basic usage

Validation

Built-in rules via custom validator:

Configuration API

min(int|float|Closure $min = 0) / max(int|float|Closure $max = 1000)

Range boundaries for slider and inputs.

step(int|float|Closure $step = 1)

Snap increment.

integer(bool|Closure $condition = true)

Restrict to whole numbers. Default: true.

decimalPlaces(int|Closure|null $places)

Fixed decimal precision when not integer.

prefix(string|Closure|null $prefix) / withoutPrefix()

Currency or unit prefix shown in inputs. Default config: $.

variant(string|Closure $variant)

showInputs(bool|Closure $condition = true)

Min/max numeric inputs below the slider. Default: true.

minInputLabel(string|Closure|null $label) / maxInputLabel(string|Closure|null $label)

Accessible labels for the numeric inputs.

histogram(array|Closure $heights)

Bar heights (8–100) for the background chart. Uses a built-in default pattern when omitted.

size(string|ControlSize|Closure $size)

See Control size.

State normalization

On hydrate and dehydrate, values are clamped to [min, max], stepped, and min is never greater than max.

FlexField schema config

Public helper methods