carwow / elm-slider / SingleSlider

A slider component, with one track thumb.

Definition


type SingleSlider msg

Type representing the SingleSlider component

Init

init : { min : Basics.Float, max : Basics.Float, step : Basics.Float, value : Basics.Float, onChange : Basics.Float -> msg } -> SingleSlider msg

Initializes a SingleSlider

View

view : SingleSlider msg -> Html msg

SingleSlider view

Update

update : Basics.Float -> SingleSlider msg -> SingleSlider msg

Update the slider's value

Config

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

Allows for customization of the maximum value label

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

Allows for customization of the minimum value label

withValueFormatter : (Basics.Float -> Basics.Float -> String) -> SingleSlider msg -> SingleSlider msg

Allows for customization of the current value label

Helper

fetchValue : SingleSlider msg -> Basics.Float

Fetch SingleSlider's value