carwow/elm-slider/5.0.2

NOTE: this package is not compatible with Elm 0.19.1

DoubleSlider

A single slider built natively in Elm

Model

type alias Model =
{ min : Float
, max : Float
, step : Int
, lowValue : Float
, highValue : Float
, dragging : Bool
, draggedValueType : SliderValueType
, rangeStartValue : Float
, thumbStartingPosition : Float
, dragStartPosition : Float
, thumbParentWidth : 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

Displays the slider using two inputs

formatCurrentRange : Model -> String

Renders the current values using the formatter