lenards/elm-ui-patternfly/4.0.2

PF6.SearchInput

PF6 SearchInput component

SearchInput provides a text field for search with clear and submit actions.

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

Definition

type SearchInput msg

Opaque SearchInput type

Constructor

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

Construct a SearchInput

searchInput { value = model.query, onChange = QueryChanged }

Content modifiers

withPlaceholder : String -> SearchInput msg -> SearchInput msg

Set placeholder text

withAriaLabel : String -> SearchInput msg -> SearchInput msg

Set accessible label

Action modifiers

Send a message on submit (enter key / search button click)

Send a message when clear is clicked

Suggestions

withHints : List String -> SearchInput msg -> SearchInput msg

Show type-ahead hint strings below the input

Rendering

toMarkup : Theme -> SearchInput msg -> Element msg

Render the SearchInput as an Element msg