uncover-co/elm-widgets-alpha/19.1.0

NOTE: the latest version is 25.0.0

W.InputFloat

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

Value

init : Maybe Float -> Value
toFloat : Value -> Float
toString : Value -> String
type Value

Styles

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

States

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

Validation

required : Bool -> Attribute msg customError
min : Float -> Attribute msg customError
max : Float -> Attribute msg customError
step : Float -> Attribute msg customError
minLength : Int -> Attribute msg customError
maxLength : Int -> Attribute msg customError
validation : (Float -> String -> Maybe customError) -> Attribute msg customError

View With Validation

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

Actions

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

Html

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