carwow/elm-slider/9.0.0

NOTE: the latest version is 11.1.6

DoubleSlider

A single slider built natively in Elm

Model

type alias Model =
{ min : Float
, max : Float
, step : Int
, lowValue : Float
, highValue : Float
, overlapThreshold : Float
, minFormatter : Float -> String
, maxFormatter : Float -> String
, currentRangeFormatter : Float -> Float -> Float -> Float -> String
}

The base model for the slider

defaultModel : Model

Returns a default range slider

Update

type Msg

The basic type accepted by the update

update : Msg -> Model -> ( Model, Cmd Msg, Bool )

takes a model and a message and applies it to create an updated model

subscriptions : Model -> Sub Msg

Returns the subscriptions necessary to run

View

view : Model -> Html Msg

Displays the slider

fallbackView : Model -> Html Msg

DEPRECATED: Displays the slider

formatCurrentRange : Model -> String

Renders the current values using the formatter