| Name | Type | Default |
|
accentColor
# |
string
|
null
|
Sets or gets the brand accent colour used for the send button, the user message bubbles, the avatars and the popup launcher. Accepts any CSS colour. When null, the default indigo accent is used.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[accentColor]="'#0ea5e9'"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
apiKey
# |
string
|
''
|
Sets or gets the platform key used to authenticate requests to the AI provider. Security note: a key set here is used to call the provider directly from the browser and is therefore exposed - this is intended for local trials only. In production, leave apiKey empty and use proxyUrl or sendRequest so your own backend holds the key.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
botAvatar
# |
string
|
null
|
Sets or gets the assistant avatar image. Accepts any image URL or data-URI. When null, a themed circle with the first letter of botName is shown.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[botAvatar]="'https://example.com/bot.png'"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
botName
# |
string
|
'Assistant'
|
Sets or gets the display name of the assistant, shown in the message meta and used for the assistant avatar initial.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[botName]="'Nova'"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
colorScheme
# |
ChatColorScheme
|
'auto'
|
ChatColorScheme: "auto" | "light" | "dark"
Sets or gets the colour scheme of the chat. Possible values: 'auto' (follow the operating system preference), 'light' and 'dark'. The scheme is applied independently of the jqWidgets theme.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[colorScheme]="'dark'"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
disabled
# |
boolean
|
false
|
Sets or gets whether the chat is disabled. When disabled, the input and send button are inactive.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[disabled]="true"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
enableClear
# |
boolean
|
true
|
Sets or gets whether the header shows the 'New chat' action button that clears the conversation.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[enableClear]="false"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
enableCopyCode
# |
boolean
|
true
|
Sets or gets whether a 'Copy' button is shown on fenced code blocks in assistant messages.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[enableCopyCode]="false"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
enableStop
# |
boolean
|
true
|
Sets or gets whether the send button turns into a 'Stop' button while the assistant is generating a response. When stopped, any text streamed so far is preserved.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[enableStop]="false"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
Sets or gets an object of additional HTTP headers merged into the outgoing request to the provider or proxy.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat #myChat
[provider]='"anthropic"' [model]='"claude-opus-4-8"' [apiKey]='"YOUR_KEY"'
[width]='400' [height]='580' [headers]='{ 'x-tenant-id': 'acme' }'>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
height
# |
string | number
|
580
|
Sets or gets the chat's height.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="600"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
launcherIcon
# |
string
|
null
|
Sets or gets custom HTML/SVG markup for the popup launcher button. Applies only when mode is 'popup'. When null, a default chat-bubble icon is used.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat #myChat
[provider]='"anthropic"' [model]='"claude-opus-4-8"' [apiKey]='"YOUR_KEY"'
[width]='400' [height]='580' [launcherIcon]=''<svg>...</svg>''>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
launcherPosition
# |
ChatLauncherPosition
|
'bottom-right'
|
ChatLauncherPosition: "bottom-right" | "bottom-left"
Sets or gets the screen corner of the popup launcher button and panel. Possible values: 'bottom-right' and 'bottom-left'. Applies only when mode is 'popup'.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[mode]="'popup'"
[launcherPosition]="'bottom-left'"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
maxTokens
# |
number
|
1024
|
Sets or gets the upper bound on the number of tokens in the assistant's response, sent to the provider as max_tokens.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[maxTokens]="2048"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
messages
# |
ChatMessage[]
|
[]
|
ChatRole: "user" | "assistant"
Interface ChatMessage { role?: ChatRole; content?: string; }
Sets or gets the conversation as an array of message objects of the form { role: 'user' | 'assistant', content: string }. Setting this property replaces the current conversation.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[messages]="[{ role: 'assistant', content: 'Hello!' }]"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
mode
# |
ChatMode
|
'inline'
|
ChatMode: "inline" | "popup"
Sets or gets the display mode. Possible values: 'inline' (the chat is an embedded panel) and 'popup' (a floating launcher button in the page corner opens the chat panel).
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[mode]="'popup'"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
model
# |
string
|
null
|
Sets or gets the model identifier sent to the provider. When null, a per-provider default is used ('claude-opus-4-8' for anthropic, 'gpt-4o-mini' for openai).
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
open
# |
boolean
|
false
|
Sets or gets whether the popup panel is open. Applies only when mode is 'popup'. Setting it to true opens the panel and hides the launcher; false collapses back to the launcher.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[mode]="'popup'"
[open]="true"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
placeHolder
# |
string
|
'Message the assistant...'
|
Sets or gets the placeholder text shown in the message input.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[placeHolder]="'Ask me anything...'"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
provider
# |
ChatProvider
|
'anthropic'
|
ChatProvider: "anthropic" | "openai" | "custom"
Sets or gets the AI provider adapter. Possible values: 'anthropic' (Anthropic Claude), 'openai' (OpenAI) and 'custom'. Custom adapters can be registered on $.jqx._jqxChat.adapters, or transport can be fully replaced with the sendRequest callback.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'openai'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
proxyUrl
# |
string
|
null
|
Sets or gets a URL to POST the request to instead of calling the provider directly. Recommended for production: your backend holds the platform key and forwards the request to the provider, keeping the key out of the browser.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat #myChat
[provider]='"anthropic"' [model]='"claude-opus-4-8"' [apiKey]='"YOUR_KEY"'
[width]='400' [height]='580' [proxyUrl]=''/api/chat''>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
rtl
# |
boolean
|
false
|
Sets or gets a value indicating whether the widget's layout is aligned to support locales using right-to-left fonts.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[rtl]="true"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
sendButtonIcon
# |
boolean
|
true
|
Sets or gets whether the send button is rendered as a circular icon (true) or as a text label using sendButtonLabel (false).
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[sendButtonIcon]="false"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
sendButtonLabel
# |
string
|
'Send'
|
Sets or gets the text label of the send button when sendButtonIcon is false. Also used as the button's tooltip.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[sendButtonIcon]="false"
[sendButtonLabel]="'Ask'"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
sendRequest
# |
any
|
null
|
Sets or gets a callback that fully controls transport: function(payload, widget). It receives the provider payload and the widget instance and returns a Promise (or value) that resolves with the final assistant text, or streams tokens into the current bubble via widget.appendDelta(delta) and resolves with no value. Useful for custom authentication, an SSE proxy or a fully offline mock.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
showAvatars
# |
boolean
|
true
|
Sets or gets whether avatars are shown next to messages.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[showAvatars]="false"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
Sets or gets whether the header (avatar, title, status and actions) is shown.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[showHeader]="false"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
Sets or gets whether the assistant avatar is shown in the header.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[showHeaderAvatar]="false"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
showTimestamps
# |
boolean
|
true
|
Sets or gets whether a timestamp is shown in each message's meta line.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[showTimestamps]="false"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
starterPrompts
# |
string[]
|
[]
|
Sets or gets an array of suggested prompt strings displayed as clickable chips when the conversation is empty. Clicking a chip sends that prompt.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[starterPrompts]="['Summarize this page', 'Draft a reply']"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
statusText
# |
string
|
'Online'
|
Sets or gets the status label shown under the title next to a status dot. When null, the status is hidden. When subtitle is set, the subtitle text takes precedence.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[statusText]="'Typically replies instantly'"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
stream
# |
boolean
|
true
|
Sets or gets whether the assistant response is streamed token by token using Server-Sent Events. When false, the full response is requested and rendered at once.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[stream]="false"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
subtitle
# |
string
|
null
|
Sets or gets the header subtitle text shown under the title. When set, it takes precedence over statusText.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[subtitle]="'Powered by Claude'"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
system
# |
string
|
'You are a helpful assistant embedded in a web application.'
|
Sets or gets the system / developer instructions sent to the model to define the assistant's behaviour.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[system]="'You are a concise support agent.'"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
theme
# |
string
|
''
|
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[theme]="'material'"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
title
# |
string
|
'AI Assistant'
|
Sets or gets the header title text (also used as the popup launcher tooltip).
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[title]="'Help Assistant'"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
typingIndicator
# |
boolean
|
true
|
Sets or gets whether an animated typing indicator is shown while the assistant is generating a response.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[typingIndicator]="false"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
userAvatar
# |
string
|
null
|
Sets or gets the user avatar image. Accepts any image URL or data-URI. When null, a themed circle with the first letter of userName is shown.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[userAvatar]="'https://example.com/me.png'"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
userName
# |
string
|
'You'
|
Sets or gets the display name of the user, shown in the message meta and used for the user avatar initial.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[userName]="'Me'"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
welcomeMessage
# |
string
|
null
|
Sets or gets the welcome text (Markdown supported) shown in the empty state above the starter prompts.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
[welcomeMessage]="'Hi! How can I help?'"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
width
# |
string | number
|
400
|
Sets or gets the chat's width.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="420"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
}
|
|
|
|
messageSent
# |
Event
|
|
This event is triggered when the user sends a message. The event argument contains args.role ('user') and args.content (the message text).
Code examples #
Bind to the messageSent event of jqxChat.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
(onMessageSent)="onMessageSent($event)"
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public onMessageSent(e: Event): void {
alert('do something...');
}
}
|
|
responseStart
# |
Event
|
|
This event is triggered when a request to the AI provider begins, before any tokens arrive.
Code examples #
Bind to the responseStart event of jqxChat.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
(onResponseStart)="onResponseStart($event)"
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public onResponseStart(e: Event): void {
alert('do something...');
}
}
|
|
responseDelta
# |
Event
|
|
This event is triggered for each streamed chunk of the assistant's response. The event argument contains args.delta (the new text) and args.content (the accumulated text so far).
Code examples #
Bind to the responseDelta event of jqxChat.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
(onResponseDelta)="onResponseDelta($event)"
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public onResponseDelta(e: Event): void {
alert('do something...');
}
}
|
|
messageReceived
# |
Event
|
|
This event is triggered when the assistant's response is complete. The event argument contains args.role ('assistant') and args.content (the full response text).
Code examples #
Bind to the messageReceived event of jqxChat.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
(onMessageReceived)="onMessageReceived($event)"
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public onMessageReceived(e: Event): void {
alert('do something...');
}
}
|
|
responseEnd
# |
Event
|
|
This event is triggered after a response finishes, alongside messageReceived. The event argument contains args.content (the full response text).
Code examples #
Bind to the responseEnd event of jqxChat.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
(onResponseEnd)="onResponseEnd($event)"
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public onResponseEnd(e: Event): void {
alert('do something...');
}
}
|
|
error
# |
Event
|
|
This event is triggered when a request fails or the connection is misconfigured. The event argument contains args.error (the error object) and args.message (the error text). Returning false from the handler suppresses the default inline error bubble.
Code examples #
Bind to the error event of jqxChat.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
(onError)="onError($event)"
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public onError(e: Event): void {
alert('do something...');
}
}
|
|
open
# |
Event
|
|
This event is triggered when the popup panel is opened. Applies only when mode is 'popup'.
Code examples #
Bind to the open event of jqxChat.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
(onOpen)="onOpen($event)"
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public onOpen(e: Event): void {
alert('do something...');
}
}
|
|
close
# |
Event
|
|
This event is triggered when the popup panel is closed. Applies only when mode is 'popup'.
Code examples #
Bind to the close event of jqxChat.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
(onClose)="onClose($event)"
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public onClose(e: Event): void {
alert('do something...');
}
}
|
|
stop
# |
Event
|
|
This event is triggered when the user stops an in-progress generation via the stop button or the stop method.
Code examples #
Bind to the stop event of jqxChat.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
(onStop)="onStop($event)"
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public onStop(e: Event): void {
alert('do something...');
}
}
|
|
create
# |
Event
|
|
This event is triggered when the widget is created and rendered.
Code examples #
Bind to the create event of jqxChat.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
(onCreate)="onCreate($event)"
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public onCreate(e: Event): void {
alert('do something...');
}
}
|
|
|
| Name | Arguments | Return Type |
|
sendMessage
# |
text
|
|
Sends a message to the assistant. When text is omitted, the current input value is used. Adds the message to the conversation and requests a response from the provider.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public ngAfterViewInit(): void {
this.myChat().sendMessage('Show me a code example');
}
}
|
|
stop
# |
None
|
|
Stops the in-progress generation. Any text streamed so far is kept in the conversation and the stop event is raised.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public ngAfterViewInit(): void {
this.myChat().stop();
}
}
|
|
addMessage
# |
role, content
|
|
Appends a message to the conversation and the view without contacting the provider.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public ngAfterViewInit(): void {
this.myChat().addMessage('assistant', 'Injected message.');
}
}
|
|
appendDelta
# |
delta
|
|
Appends a chunk of streamed text into the current assistant bubble. Intended for use inside a sendRequest callback that drives streaming manually. Late chunks are ignored after a stop.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public ngAfterViewInit(): void {
this.myChat().appendDelta('Hello');
}
}
|
|
getMessages
# |
None
|
|
Returns a copy of the conversation history as an array of message objects.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public ngAfterViewInit(): void {
this.myChat().getMessages();
}
}
|
|
clearConversation
# |
None
|
|
Clears the conversation and restores the empty state (welcome message and starter prompts).
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public ngAfterViewInit(): void {
this.myChat().clearConversation();
}
}
|
|
focus
# |
None
|
|
Moves keyboard focus to the message input. In popup mode, focus is applied only when the panel is open.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public ngAfterViewInit(): void {
this.myChat().focus();
}
}
|
Opens the popup panel and hides the launcher. Applies only when mode is 'popup'.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public ngAfterViewInit(): void {
this.myChat().openPopup();
}
}
|
Closes the popup panel and shows the launcher. Applies only when mode is 'popup'.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public ngAfterViewInit(): void {
this.myChat().closePopup();
}
}
|
|
toggle
# |
None
|
|
Toggles the popup panel open or closed. Applies only when mode is 'popup'.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public ngAfterViewInit(): void {
this.myChat().toggle();
}
}
|
|
val
# |
value
|
|
Returns the conversation history as an array of message objects (alias of getMessages).
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public ngAfterViewInit(): void {
this.myChat().val();
}
}
|
|
render
# |
None
|
|
Renders the widget.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public ngAfterViewInit(): void {
this.myChat().render();
}
}
|
|
refresh
# |
None
|
|
Refreshes the widget's layout (re-measures and re-sizes the message area).
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public ngAfterViewInit(): void {
this.myChat().refresh();
}
}
|
|
destroy
# |
None
|
|
Destroys the widget and removes it (and the popup launcher, if any) from the DOM.
import { Component, viewChild } from '@angular/core';
import { jqxChatComponent, jqxChatModule } from 'jqwidgets-ng/jqxchat';
@Component({
selector: 'app-root',
imports: [jqxChatModule],
template: `<jqxChat
#myChat
[provider]="'anthropic'"
[model]="'claude-opus-4-8'"
[apiKey]="'YOUR_KEY'"
[width]="400"
[height]="580"
>
</jqxChat>`,
styles: [``]
})
export class App {
readonly myChat = viewChild.required<jqxChatComponent>('myChat');
public ngAfterViewInit(): void {
this.myChat().destroy();
}
}
|