mc706/prefab-ui/5.0.1

NOTE: the latest version is 5.1.0

Prefab.Input

Text Inputs

Creating

new :
{ onChange : String -> msg
, value : String
, label : String
}
-> Input msg

Create a new input

view : List (Attribute msg) -> Input msg -> Element msg

View an input

Modifying

withDisabled : Bool -> Input msg -> Input msg

Modify the disabled state of an input

withError : Maybe String -> Input msg -> Input msg

Modify the error state of an input

withHelpText : String -> Input msg -> Input msg

Modify the help text of an input

withInputType : InputType -> Input msg -> Input msg

Modify the input type of an input

withLayout : Layout -> Input msg -> Input msg

Modify the layout of an input

withOnEnter : msg -> Input msg -> Input msg

Modify the onEnter message of an input

withPlaceholder : String -> Input msg -> Input msg

Modify the placeholder of an input

withRequired : Input msg -> Input msg

Modify the required state of an input

withSpellCheck : Input msg -> Input msg

Modify the spell check of an input

Types

= Text
| Username
| CurrentPassword
| NewPassword
| Email
| Search
| Spellchecked
| Multiline

The type of input to display

type Layout
= Vertical
| Horizontal

The layout of the input