# ChatInputComponent

Package: `@threadplane/chat` · 0.3.4

Reference: /docs/api/chat/ChatInputComponent

```typescript
import { ChatInputComponent } from '@threadplane/chat';
```

## ChatInputComponent

Provides an auto-resizing message composer that submits to an agent and can stop its current response.

```typescript
export declare class ChatInputComponent  {
  constructor();
  readonly agent: import("@angular/core").InputSignal<Agent<unknown>>;
  readonly canStop: import("@angular/core").Signal<boolean>;
  readonly canSubmit: import("@angular/core").Signal<boolean>;
  readonly focused: import("@angular/core").WritableSignal<boolean>;
  focusTextarea(): void;
  readonly isLoading: import("@angular/core").Signal<boolean>;
  readonly messageText: import("@angular/core").WritableSignal<string>;
  onKeydown(event: KeyboardEvent): void;
  onStop(): void;
  onSubmit(): void;
  readonly placeholder: import("@angular/core").InputSignal<string>;
  readonly showStopButton: import("@angular/core").InputSignal<boolean>;
  readonly stopped: import("@angular/core").OutputEmitterRef<void>;
  readonly submitOnEnter: import("@angular/core").InputSignal<boolean>;
  readonly submitted: import("@angular/core").OutputEmitterRef<string>;
}
```

**Angular selector:** `chat-input`

- Input `agent` (required): `Agent<unknown>`

- Input `placeholder`: `string`

- Input `showStopButton`: `boolean`

- Input `submitOnEnter`: `boolean`

- Output `stopped`: `void`

- Output `submitted`: `string`

### Constructor · overload 1

Auto-resize the textarea to fit its content as the user types or pastes
multi-line text. Caps at min(40vh, 320px); beyond that the textarea
scrolls. Without this, multi-line input is hidden behind the rows="1"
fixed height (caught by live browser smoke).

```typescript
constructor();
```

### agent

```typescript
readonly agent: import("@angular/core").InputSignal<Agent<unknown>>;
```

### canStop

The stop button only appears when the consumer opted in AND we're loading.

```typescript
readonly canStop: import("@angular/core").Signal<boolean>;
```

### canSubmit

Submit is allowed only when not loading and there's non-whitespace text.

```typescript
readonly canSubmit: import("@angular/core").Signal<boolean>;
```

### focused

```typescript
readonly focused: import("@angular/core").WritableSignal<boolean>;
```

### focusTextarea · overload 1

```typescript
focusTextarea(): void;
```

### isLoading

```typescript
readonly isLoading: import("@angular/core").Signal<boolean>;
```

### messageText

```typescript
readonly messageText: import("@angular/core").WritableSignal<string>;
```

### onKeydown · overload 1

```typescript
onKeydown(event: KeyboardEvent): void;
```

### onStop · overload 1

Abort the current streaming response (if the adapter supports it).

```typescript
onStop(): void;
```

### onSubmit · overload 1

```typescript
onSubmit(): void;
```

### placeholder

```typescript
readonly placeholder: import("@angular/core").InputSignal<string>;
```

### showStopButton

When true (default), shows a stop button while the agent is streaming.

```typescript
readonly showStopButton: import("@angular/core").InputSignal<boolean>;
```

### stopped

```typescript
readonly stopped: import("@angular/core").OutputEmitterRef<void>;
```

### submitOnEnter

```typescript
readonly submitOnEnter: import("@angular/core").InputSignal<boolean>;
```

### submitted

```typescript
readonly submitted: import("@angular/core").OutputEmitterRef<string>;
```