Overview

tng-text-input is a standalone input component that implements ControlValueAccessor for Angular forms. It supports prefix/suffix projection, IME-safe typing, and Tailng’s klass-based theming.

CVA IME safe Prefix/Suffix Klass hooks Standalone
Reactive Forms

Quick example

Basic
HTMLTSCSS

<form [formGroup]="login">
  <tng-text-input
    formControlName="userName"
    placeholder="Enter username"
    frameKlass="border-2 border-blue-900 rounded-md shadow-md focus-within:ring-blue-900"
  />
</form>

Works with formControlName and template-driven forms.

Search with prefix
HTMLTSCSS

<form [formGroup]="form">
  <tng-text-input placeholder="Search..."
    formControlName="search"
    inputKlass="text-blue-700"
  >
    <tng-icon
      tngPrefix
      name="bootstrapSearch"
      class="ml-3 text-muted"
    />
  </tng-text-input>
</form>

Use [tngPrefix] and [tngSuffix] for icons/actions.

Features

IME-safe input

Handles composition events correctly for languages like Japanese, Chinese, and Korean.

Prefix / Suffix slots

Project icons or actions before/after the input using tngPrefix / tngSuffix.

Klass theming

Customize shell and slots via frameKlass, inputKlass, prefixKlass, suffixKlass.

Forms-ready

Full ControlValueAccessor integration for reactive and template-driven forms.

Tip: keep projected icon spacing inside the projected elements (e.g. ml-3 / mr-3) for consistent alignment.