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 slot-based theming.

CVA IME safe Prefix/Suffix Slot hooks Standalone
Reactive Forms

Quick example

Basic
HTMLTSCSS

<form [formGroup]="login">
  <tng-text-input
    formControlName="userName"
    placeholder="Enter username"
    [slot]="customSlot"
  />
</form>

Works with formControlName and template-driven forms.

Search with prefix
HTMLTSCSS

<form [formGroup]="form">
  <tng-text-input placeholder="Search..."
    formControlName="search"
    [slot]="searchSlot"
  >
    <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.

Slot-based micro styling

Customize styling via the slot input with keys: frame, input, prefix, suffix.

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.