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

    Class ZetaTextInput

    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.

    required: boolean
    rounded: boolean
    size: "small" | "medium" | "large"
    suffix?: string

    Suffix text.

    trailingIcon?: ZetaIconName

    Trailing icon name.

    type: "number" | "text" | "textarea" | "password" | "time" | "date" = "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>