carwow/elm-slider/11.1.2

NOTE: the latest version is 11.1.6

SingleSlider

A slider component, with one track thumb.

Definition

type SingleSlider msg

Type representing the SingleSlider component

Init

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

Initializes a SingleSlider

View

view : SingleSlider msg -> Html msg

SingleSlider view

Update

update : Float -> SingleSlider msg -> SingleSlider msg

Update the slider's value

Config

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

Allows for customization of the maximum value label

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

Allows for customization of the minimum value label

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

Allows for customization of the current value label

Helper

fetchValue : SingleSlider msg -> Float

Fetch SingleSlider's value