uncover-co/elm-widgets-alpha/18.0.0

NOTE: the latest version is 25.0.0

W.InputText

List (Attribute msg customError)
-> { onInput : String -> msg
, value : String
}
-> Html msg

Types

email : Attribute msg customError
password : Attribute msg customError
telephone : Attribute msg customError
url : Attribute msg customError

Styles

placeholder : String -> Attribute msg customError
mask : (String -> String) -> Attribute msg customError
prefix : Html msg -> Attribute msg customError
suffix : Html msg -> Attribute msg customError
unstyled : Attribute msg customError

States

disabled : Bool -> Attribute msg customError
readOnly : Bool -> Attribute msg customError

Actions

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

Validation

required : Bool -> Attribute msg customError
minLength : Int -> Attribute msg customError
maxLength : Int -> Attribute msg customError
exactLength : Int -> Attribute msg customError
pattern : String -> Attribute msg customError
validation : (String -> Maybe customError) -> Attribute msg customError

View With Validation

List (Attribute msg customError)
-> { value : String
, onInput : Result (Error customError) String -> String -> msg
}
-> Html msg
errorToString : Error customError -> String
type Error customError
= PatternMismatch String
| InputTypeMismatch InputType String
| TooLong Int String
| TooShort Int String
| ValueMissing String
| Custom customError

Html

htmlAttrs : List (Attribute msg) -> Attribute msg customError
noAttr : Attribute msg customError
type Attribute msg customError