carwow/elm-slider/6.0.1

NOTE: the latest version is 11.1.6

SingleSlider

A single slider built natively in Elm

Model

type alias Model =
{ min : Float
, max : Float
, step : Float
, value : Float
, minFormatter : Float -> String
, maxFormatter : Float -> String
, currentValueFormatter : Float -> Float -> String
, disabled : Bool
}

The base model for the slider

defaultModel : Model

Default model

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