lenards/elm-ui-patternfly/4.0.1

NOTE: the latest version is 4.0.2

PF6.TextInput

PF6 TextInput component

Text inputs are used to gather free-form text input from the user.

See: https://www.patternfly.org/components/text-input

Definition

type TextInput msg

Opaque TextInput type

type Type

Input type

Constructor

{ value : String
, onChange : String -> msg
}
-> TextInput msg

Construct a TextInput

textInput { value = model.name, onChange = NameChanged }

Content modifiers

withPlaceholder : String -> TextInput msg -> TextInput msg

Set placeholder text

withHelperText : String -> TextInput msg -> TextInput msg

Set helper text below the input

withLabel : String -> TextInput msg -> TextInput msg

Set the visible label

Input type modifiers

Password input type (masked)

Email input type

Search input type

Number input type

Tel input type

Validation modifiers

Success validation state (green border)

Danger/error validation state (red border)

Warning validation state (yellow border)

State modifiers

Disable the input

Make the input read-only

Icon

withIcon : Element msg -> TextInput msg -> TextInput msg

Add an icon inside the input (leading)

Rendering

toMarkup : Theme -> TextInput msg -> Element msg

Render the TextInput as an Element msg