# TemplateChatMessage Type documentation

## TypeScript declaration

### [TemplateChatMessage](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/chat-message.model.ts#L118-L126>)

**Kind:** interface

```
import type { TemplateChatMessage } from '@siemens/element-ng/chat-messages';
```

Render custom chat message via template, consider using [SiChatMessageComponent](<../../components/SiChatMessageComponent/index.html#SiChatMessageComponent>) inside the template for consistent styling

See: [SiAiChatComponent](<../../components/SiAiChatComponent/index.html#SiAiChatComponent>) for the AI chat container where this is used

See: [SiChatMessageComponent](<../../components/SiChatMessageComponent/index.html#SiChatMessageComponent>) for the chat message wrapper component which can be used inside the template

```
interface TemplateChatMessage
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [template](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/chat-message.model.ts#L122-L122>) | `TemplateRef<any>` | Template to render the message |
| [templateContext](<https://github.com/siemens/element/blob/main/projects/element-ng/chat-messages/chat-message.model.ts#L125-L125>) (optional) | `any` | Context data to pass to the template |
