georgesboris/elm-widgets-alpha/4.15.1

NOTE: the latest version is 4.18.3

W.InputInt

List (Attribute msg)
-> { value : Value
, onInput : Value -> msg
}
-> Html msg
type alias Attribute msg =
Attr (Attributes msg)

Value

init : Maybe Int -> Value
toInt : Value -> Maybe Int
toString : Value -> String
type Value

Styles

small : Attribute msg
placeholder : String -> Attribute msg
mask : (String -> String) -> Attribute msg
prefix : List (Html msg) -> Attribute msg
suffix : List (Html msg) -> Attribute msg

States

autofocus : Attribute msg
disabled : Attribute msg
readOnly : Attribute msg

Validation Attributes

required : Attribute msg
min : Int -> Attribute msg
max : Int -> Attribute msg
step : Int -> Attribute msg
validation : (Maybe Int -> String -> Maybe String) -> Attribute msg

View With Validation

List (Attribute msg)
-> { value : Value
, onInput : Result (List Error) (Maybe Int) -> Value -> msg
}
-> Html msg
errorToString : Error -> String
type Error
= TooLow Int String
| TooHigh Int String
| StepMismatch Int String
| ValueMissing String
| Custom String

Actions

onEnter : msg -> Attribute msg
onFocus : msg -> Attribute msg
onBlur : msg -> Attribute msg

Html

id : String -> Attribute msg