uncover-co/elm-widgets/2.6.1

NOTE: the latest version is 2.28.0

W.InputText

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

Types

Styles

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

States

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

Actions

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

Validation Attributes

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

View With Validation

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

Html

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