carwow / elm-slider / DoubleSlider

A slider component, with two track thumbs.

Definition


type DoubleSlider msg

Type representing the DoubleSlider component

Init

init : { min : Basics.Float, max : Basics.Float, step : Basics.Float, lowValue : Basics.Float, highValue : Basics.Float, onLowChange : Basics.Float -> msg, onHighChange : Basics.Float -> msg } -> DoubleSlider msg

Initializes a DoubleSlider

View

view : DoubleSlider msg -> Html msg

DoubleSlider view

Updaters

updateHighValue : Basics.Float -> DoubleSlider msg -> DoubleSlider msg

Update the slider's value

updateLowValue : Basics.Float -> DoubleSlider msg -> DoubleSlider msg

Update the slider's low value

Config

withCurrentRangeFormatter : ({ lowValue : Basics.Float, highValue : Basics.Float, min : Basics.Float, max : Basics.Float } -> String) -> DoubleSlider msg -> DoubleSlider msg

Allows for customization of the slider's range label

withHighValueFormatter : (Basics.Float -> Basics.Float -> String) -> DoubleSlider msg -> DoubleSlider msg

Allows for customization of the current high value label

withLowValueFormatter : (Basics.Float -> Basics.Float -> String) -> DoubleSlider msg -> DoubleSlider msg

Allows for customization of the current low value label

withMaxFormatter : (Basics.Float -> String) -> DoubleSlider msg -> DoubleSlider msg

Allows for customization of the maximum value label

withMinFormatter : (Basics.Float -> String) -> DoubleSlider msg -> DoubleSlider msg

Allows for customization of the minimum value label

withOverlapThreshold : Basics.Float -> DoubleSlider msg -> DoubleSlider msg

The overlap threshold determines the minimum difference between the two thumbs. By default it is set to 1.0

Helper

fetchLowValue : DoubleSlider msg -> Basics.Float

Fetch DoubleSlider's Low value

fetchHighValue : DoubleSlider msg -> Basics.Float

Fetch DoubleSlider's High value