@zebra-fed/zeta-web
    Preparing search index...

    Class ZetaTextInput

    A text input field for entering text.

    Text input component with icon, affix, label and hint text.

    To change the width of the input field, either wrap it in a div with a fixed width, or you can apply display: block to the input field, and then provide a width.

    focus - Fired when the input field is focused blur - Fired when the input field is blurred change - Fired when the input value changes and is committed input - Fired when the input value changes

    Hierarchy

    • FormFieldInterface<this> & LitElement<this> & SizeInterface<this> & ContourableInterface<
          this,
      > & InteractiveInterface<this>
      • ZetaTextInput
    Index

    Other

    • Returns ZetaTextInput

    checked?: boolean
    disabled: boolean
    error: boolean = false

    Whether text field is in error state.

    errorText?: string

    Error hint text

    Shown if error, replaces hintText.

    hintText?: string

    Hint text shown below text field.

    if error, then errorText is shown instead.

    indeterminate: boolean
    input: HTMLInputElement
    internals: ElementInternals
    label: string = ""

    Label shown above text field.

    leadingIcon?: ZetaIconName

    Leading icon name.

    max: number
    min: number
    name: string
    placeholder: string
    prefix: string = ""

    Prefix text.

    readOnly?: boolean
    required: boolean
    rounded: boolean
    rows?: number

    The number of visible text lines for the control. If it is specified, it must be a positive integer. If it is not specified, the default value is 2.

    Prop only applies when type is set to textarea.

    showClearButton: boolean = false

    Displays a button to clear the text field when true. This will always display in the right most position and will push any trailing icon or suffix to the left. It will apply to all text field types and will push any type specific interactions to the left as well. For type textarea, the clear button will be displayed in the top right corner of the text area. The clear button will not be displayed if the text field is disabled or read-only.

    size: "small" | "medium" | "large"
    suffix?: string

    Suffix text.

    trailingIcon?: ZetaIconName

    Trailing icon name.

    type: "number" | "text" | "textarea" | "time" | "date" | "password" | "integer" = "text"

    Type of field

    value: string
    shadowRootOptions: ShadowRootInit = ...
    styles: CSSResultGroup[] = ...
    • Parameters

      • event: Event

      Returns void

    lifecycle

    • Invoked when the component is added to the document's DOM.

      In connectedCallback() you should setup tasks that should only occur when the element is connected to the document. The most common of these is adding event listeners to nodes external to the element, like a keydown event handler added to the window.

      connectedCallback() {
      super.connectedCallback();
      addEventListener('keydown', this._handleKeydown);
      }

      Typically, anything done in connectedCallback() should be undone when the element is disconnected, in disconnectedCallback().

      Returns void

    rendering

    • Invoked on each update to perform rendering tasks. This method may return any value renderable by lit-html's ChildPart - typically a TemplateResult. Setting properties inside this method will not trigger the element to update.

      Returns TemplateResult<1>