Skip to main content

Function: valuePercent()

function valuePercent(
value,
__namedParameters,
reversed?
): number;

Defined in: dom/src/position.ts:11

Where a value sits along a track, as a whole percentage from its start.

Normalized along the scale, so a thumb, the fill behind it and the marks all sit on the curve the drag follows. reversed measures from the other end — for a track that grows upwards or leftwards on screen, since CSS places things from the top and the left.

Parameters​

ParameterTypeDefault value
valuenumberundefined
__namedParametersPick<ValueRange, "min" | "max" | "scale">undefined
reversedbooleanfalse

Returns​

number