Skip to content

Slider Field

A drag handle instead of a number input. A tooltip with the current value follows the handle.

Settings:

SettingWhat it does
Min valueLeft end of the range
Max valueRight end
StepHow much one notch moves the value

The stored value is a plain number, exactly as a Number field would store it.

Output:

html
<div class="bar" style="width: {$readiness}%"></div>

Whole numbers only

The step cannot go below 1, and the value carries no decimals. For a price, a weight or anything else that needs a fraction, use Number.

A slider earns its place when the bounds themselves are the meaning — a percentage, a rating out of ten, a priority from one to five. For "how many pieces" a plain number input is faster to fill in and far easier to correct.

© PageBlocks 2019-present