Package org.patternfly.component.form
Class TextInput
java.lang.Object
org.patternfly.component.BaseComponent<HTMLElement,TextInput>
org.patternfly.component.form.FormControl<HTMLElement,TextInput>
org.patternfly.component.form.TextInput
- All Implemented Interfaces:
Container<HTMLElement,
,TextInput> Finder<HTMLElement>
,HasElement<HTMLElement,
,TextInput> HasHTMLElement<HTMLElement,
,TextInput> IsElement<HTMLElement>
,TypedBuilder<HTMLElement,
,TextInput> Component
,HasValue<String>
,WithIcon<HTMLElement,
,TextInput> WithText<HTMLElement,
,TextInput> Modifiers.Disabled<HTMLElement,
,TextInput> Modifiers.Plain<HTMLElement,
,TextInput> Modifiers.Readonly<HTMLElement,
,TextInput> Modifiers.Required<HTMLElement,
TextInput>
public class TextInput
extends FormControl<HTMLElement,TextInput>
implements HasValue<String>, Modifiers.Plain<HTMLElement,TextInput>, Modifiers.Readonly<HTMLElement,TextInput>, WithIcon<HTMLElement,TextInput>, WithText<HTMLElement,TextInput>
A text input is used to gather free-form text from a user.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionapplyTo
(Consumer<InputElementBuilder<HTMLInputElement>> consumer) Provides access to the underlying input element using a fluent API styleexpanded()
Same as expanded(true)expanded
(boolean expanded) Adds/removes modifier(expanded)Returns the underlying input elementonChange
(ChangeHandler<TextInput, String> changeHandler) Defines a change handler that is called when thevalue()
of this text input changes.placeholder
(String placeholder) plain
(boolean plain) readonly
(boolean readonly) required
(boolean required) text()
Same asvalue(String)
static TextInput
static TextInput
static TextInput
textInput
(TextInputType type, String id) static TextInput
textInput
(TextInputType type, String id, String value) that()
value()
Same as value(value, false)Methods inherited from class org.patternfly.component.form.FormControl
disabled, resetValidation, validated
Methods inherited from class org.patternfly.component.BaseComponent
componentType, element
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jboss.elemento.Container
add, add, add, addAll, addAll, addAll, addAll, addAll, addAll
Methods inherited from interface org.jboss.elemento.HasElement
add, apply, aria, aria, aria, attr, attr, attr, classList, classList, css, id, innerHtml, on, on, on, run, textContent, textNode, toggle, toggle, toggle, uniqueId
Methods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, style, style, style, style, style, title
Methods inherited from interface org.patternfly.style.Modifiers.Disabled
disabled, isDisabled
Methods inherited from interface org.patternfly.style.Modifiers.Plain
plain
Methods inherited from interface org.patternfly.style.Modifiers.Readonly
readonly
Methods inherited from interface org.patternfly.style.Modifiers.Required
required
-
Method Details
-
textInput
-
textInput
-
textInput
-
textInput
-
readonly
- Specified by:
readonly
in interfaceModifiers.Readonly<HTMLElement,
TextInput>
-
expanded
Same as expanded(true) -
expanded
Adds/removes modifier(expanded) -
plain
- Specified by:
plain
in interfaceModifiers.Plain<HTMLElement,
TextInput>
-
required
- Specified by:
required
in interfaceModifiers.Required<HTMLElement,
TextInput>
-
text
Same asvalue(String)
- Specified by:
text
in interfaceWithText<HTMLElement,
TextInput>
-
value
Same as value(value, false) -
value
-
placeholder
-
applyTo
Provides access to the underlying input element using a fluent API style -
icon
- Specified by:
icon
in interfaceWithIcon<HTMLElement,
TextInput>
-
removeIcon
- Specified by:
removeIcon
in interfaceWithIcon<HTMLElement,
TextInput>
-
that
- Specified by:
that
in interfaceTypedBuilder<HTMLElement,
TextInput>
-
onChange
Defines a change handler that is called when thevalue()
of this text input changes. Changes are detected by adding an event listener for the keyup event to the text input element. -
value
-
inputElement
Returns the underlying input element -
text
- Specified by:
text
in interfaceWithText<HTMLElement,
TextInput>
-