mc706 / prefab-ui / Prefab.Input

Text Inputs

Creating

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

Create a new input

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

View an input

Modifying

withDisabled : Basics.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


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

The type of input to display


type Layout
    = Vertical
    | Horizontal

The layout of the input