uncover-co / elm-widgets-alpha / W.InputInt

view : List (Attribute msg) -> { value : Value, onInput : Value -> msg } -> Html msg

Value

init : Maybe Basics.Int -> Value

toInt : Value -> Basics.Int

toString : Value -> String


type Value

Styles

placeholder : String -> Attribute msg

mask : (String -> String) -> Attribute msg

prefix : List (Html msg) -> Attribute msg

suffix : List (Html msg) -> Attribute msg

States

disabled : Basics.Bool -> Attribute msg

readOnly : Basics.Bool -> Attribute msg

Validation Attributes

required : Basics.Bool -> Attribute msg

min : Basics.Int -> Attribute msg

max : Basics.Int -> Attribute msg

step : Basics.Int -> Attribute msg

validation : (Basics.Int -> String -> Maybe String) -> Attribute msg

View With Validation

viewWithValidation : List (Attribute msg) -> { value : Value, onInput : Result (List Error) Basics.Int -> Value -> msg } -> Html msg

errorToString : Error -> String


type Error
    = TooLow Basics.Int String
    | TooHigh Basics.Int String
    | StepMismatch Basics.Int String
    | ValueMissing String
    | Custom String

Actions

onEnter : msg -> Attribute msg

onFocus : msg -> Attribute msg

onBlur : msg -> Attribute msg

Html

htmlAttrs : List (Html.Attribute msg) -> Attribute msg

noAttr : Attribute msg


type Attribute msg