abadi199/elm-input-extra/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

Number

Number input

Model

type alias Model =
{ value : String
, hasFocus : Bool
}

(TEA) Model record

init : Model

(TEA) Initial model constant

View

input : Options -> List (Attribute Msg) -> Model -> Html Msg

(TEA) View function

type alias Options =
{ id : String
, maxLength : Maybe Int
, maxValue : Maybe Int
, minValue : Maybe Int
}

Options of the input component.

* id is the id of the HTML element. * maxLength is the maximum number of character allowed in this input. Set to Nothing for no limit. * maxValue is the maximum number value allowed in this input. Set to Nothing for no limit. * minValue is the minimum number value allowed in this input. Set to Nothing for no limit.

Update

update : Msg -> Model -> Model

(TEA) Update function