com.vaadin.flow.component.html.

Class Input

    • Constructor Detail

      • Input

        public Input()

        Creates a new input without any specific type.

    • Method Detail

      • setPlaceholder

        public void setPlaceholder(String placeholder)

        Sets the placeholder text that is shown if the input is empty.

        Parameters:

        placeholder - the placeholder text to set, or null to remove the placeholder

      • getPlaceholder

        public Optional<String> getPlaceholder()

        Gets the placeholder text.

        Returns:

        an optional placeholder, or an empty optional if no placeholder has been set

        See Also:

        setPlaceholder(String)

      • getType

        public String getType()

        Gets the type of this input.

        Returns:

        the input type, by default "text"