com.github.fluorumlabs.disconnect.vaadin.TextArea Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of disconnect-vaadin Show documentation
Show all versions of disconnect-vaadin Show documentation
Vaadin components bindings for Disconnect Zero
The newest version!
package com.github.fluorumlabs.disconnect.vaadin;
import com.github.fluorumlabs.disconnect.core.annotations.WebComponent;
import com.github.fluorumlabs.disconnect.vaadin.elements.TextAreaElement;
import com.github.fluorumlabs.disconnect.vaadin.mixins.HasTextFieldMixin;
import com.github.fluorumlabs.disconnect.vaadin.mixins.HasThemableMixin;
import com.github.fluorumlabs.disconnect.zero.component.*;
import com.github.fluorumlabs.disconnect.zero.observable.ObservableEvent;
import js.web.dom.Event;
/**
* <vaadin-text-area>
is a Web Component for text area control in forms.
*
* <vaadin-text-area label="Add description">
* </vaadin-text-area>
*
* Prefixes and suffixes
* These are child elements of a <vaadin-text-area>
that are displayed
* inline with the input, before or after.
* In order for an element to be considered as a prefix, it must have the slot
* attribute set to prefix
(and similarly for suffix
).
*
* <vaadin-text-area label="Add description">
* <div slot="prefix">Details:</div>
* <div slot="suffix">The end!</div>
* </vaadin-text-area>
*
* Styling
* The following shadow DOM parts are available for styling:
*
*
*
* Part name Description
*
*
* label
The label element
* input-field
The element that wraps prefix, value and suffix
* value
The text value element inside the input-field
element
* error-message
The error message element
*
*
* The following state attributes are available for styling:
*
*
*
* Attribute Description Part name
*
*
* disabled
Set to a disabled text field :host
* has-value
Set when the element has a value :host
* has-label
Set when the element has a label :host
* invalid
Set when the element is invalid :host
* focused
Set when the element is focused :host
* focus-ring
Set when the element is keyboard focused :host
* readonly
Set to a readonly text field :host
*
*
* See
* ThemableMixin – how to apply styles for shadow parts
*/
@WebComponent
public class TextArea extends AbstractComponent
implements HasTextFieldMixin,
HasThemableMixin,
HasSlots,
HasStyle, HasComponents> {
public TextArea() {
super(TextAreaElement.TAGNAME());
}
/**
* Fired when the text-area height changes.
*/
public ObservableEvent ironResizeEvent() {
return createEvent("iron-resize");
}
public HasSlots.Container prefixSlot() {
return slotted("prefix");
}
public HasSlots.Container textareaSlot() {
return slotted("textarea");
}
public HasSlots.Container suffixSlot() {
return slotted("suffix");
}
}