abadi199/elm-input-extra/5.2.1

NOTE: this package is not compatible with Elm 0.19.1

Input.BigNumber

Big Number input. This is a number input for big number values that can't be stored using Int and uses String instead.

View

input : Options msg -> List (Attribute msg) -> String -> Html msg

View function

Example:

type Msg = InputUpdated String | FocusUpdated Bool


Input.Number.input
    { onInput = InputUpdated
    , maxLength = Nothing
    , maxValue = 1000
    , minValue = 10
    , hasFocus = Just FocusUpdated
    }
    [ class "numberInput"
    ...
    ]
    model.currentValue
type alias Options msg =
{ maxLength : Maybe Int
, onInput : String -> msg
, hasFocus : Maybe (Bool -> msg)
}

Options of the input component.

* maxLength is the maximum number of character allowed in this input. Set to Nothing for no limit. * onInput is the Msg tagger for the onInput event. * hasFocus is an optional Msg tagger for onFocus/onBlur event.

defaultOptions : (String -> msg) -> Options msg

Default value for Options. Params: * onInput (type: String -> msg) : The onInput Msg tagger

Value:

{ onInput = onInput
, maxLength = Nothing
, hasFocus = Nothing
}