| 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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :accentColor="'#0ea5e9'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :botAvatar="'https://example.com/bot.png'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
botName
# |
String
|
'Assistant'
|
Sets or gets the display name of the assistant, shown in the message meta and used for the assistant avatar initial.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :botName="'Nova'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
colorScheme
# |
String
|
'auto'
|
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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :colorScheme="'dark'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
disabled
# |
Boolean
|
false
|
Sets or gets whether the chat is disabled. When disabled, the input and send button are inactive.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :disabled="true"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
enableClear
# |
Boolean
|
true
|
Sets or gets whether the header shows the 'New chat' action button that clears the conversation.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :enableClear="false"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
enableCopyCode
# |
Boolean
|
true
|
Sets or gets whether a 'Copy' button is shown on fenced code blocks in assistant messages.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :enableCopyCode="false"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :enableStop="false"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
Sets or gets an object of additional HTTP headers merged into the outgoing request to the provider or proxy.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :headers="{ 'x-tenant-id': 'acme' }"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
height
# |
Number | String
|
580
|
Sets or gets the chat's height.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="600"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :launcherIcon="'<svg>...</svg>'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
launcherPosition
# |
String
|
'bottom-right'
|
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'.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :mode="'popup'" :launcherPosition="'bottom-left'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :maxTokens="2048"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
messages
# |
Array
|
[]
|
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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :messages=" [ { role: 'assistant', content: 'Hello!' } ] "
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
mode
# |
String
|
'inline'
|
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).
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :mode="'popup'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
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).
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :mode="'popup'" :open="true"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
placeHolder
# |
String
|
'Message the assistant...'
|
Sets or gets the placeholder text shown in the message input.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :placeHolder="'Ask me anything...'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
provider
# |
String
|
'anthropic'
|
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.
<template>
<JqxChat ref="myChat"
:provider="'openai'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'" :width="400"
:height="580"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :proxyUrl="'/api/chat'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
rtl
# |
Boolean
|
false
|
Sets or gets a value indicating whether the widget's layout is aligned to support locales using right-to-left fonts.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :rtl="true"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
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).
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :sendButtonIcon="false"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
sendButtonLabel
# |
String
|
'Send'
|
Sets or gets the text label of the send button when sendButtonIcon is false. Also used as the button's tooltip.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :sendButtonIcon="false" :sendButtonLabel="'Ask'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
showAvatars
# |
Boolean
|
true
|
Sets or gets whether avatars are shown next to messages.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :showAvatars="false"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
Sets or gets whether the header (avatar, title, status and actions) is shown.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :showHeader="false"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
Sets or gets whether the assistant avatar is shown in the header.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :showHeaderAvatar="false"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
showTimestamps
# |
Boolean
|
true
|
Sets or gets whether a timestamp is shown in each message's meta line.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :showTimestamps="false"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
starterPrompts
# |
Array
|
[]
|
Sets or gets an array of suggested prompt strings displayed as clickable chips when the conversation is empty. Clicking a chip sends that prompt.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :starterPrompts=" [ 'Summarize this page', 'Draft a reply' ] "
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :statusText="'Typically replies instantly'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :stream="false"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
subtitle
# |
String
|
null
|
Sets or gets the header subtitle text shown under the title. When set, it takes precedence over statusText.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :subtitle="'Powered by Claude'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :system="'You are a concise support agent.'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
theme
# |
String
|
''
|
Sets the widget's theme.
Note: jqxChat renders a self-contained modern skin and does not inherit the theme's fill colours; use colorScheme and accentColor to restyle it.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :theme="'material'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
title
# |
String
|
'AI Assistant'
|
Sets or gets the header title text (also used as the popup launcher tooltip).
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :title="'Help Assistant'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
typingIndicator
# |
Boolean
|
true
|
Sets or gets whether an animated typing indicator is shown while the assistant is generating a response.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :typingIndicator="false"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :userAvatar="'https://example.com/me.png'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
userName
# |
String
|
'You'
|
Sets or gets the display name of the user, shown in the message meta and used for the user avatar initial.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :userName="'Me'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
welcomeMessage
# |
String
|
null
|
Sets or gets the welcome text (Markdown supported) shown in the empty state above the starter prompts.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580" :welcomeMessage="'Hi! How can I help?'"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
width
# |
Number | String
|
400
|
Sets or gets the chat's width.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="420" :height="580"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
</script>
|
|
|
|
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.
<template>
<JqxChat ref="myChat" @messageSent="onMessageSent($event)"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
function onMessageSent(event) {
alert('do something...');
}
</script>
|
|
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.
<template>
<JqxChat ref="myChat" @responseStart="onResponseStart($event)"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
function onResponseStart(event) {
alert('do something...');
}
</script>
|
|
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.
<template>
<JqxChat ref="myChat" @responseDelta="onResponseDelta($event)"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
function onResponseDelta(event) {
alert('do something...');
}
</script>
|
|
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.
<template>
<JqxChat ref="myChat" @messageReceived="onMessageReceived($event)"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
function onMessageReceived(event) {
alert('do something...');
}
</script>
|
|
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.
<template>
<JqxChat ref="myChat" @responseEnd="onResponseEnd($event)"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
function onResponseEnd(event) {
alert('do something...');
}
</script>
|
|
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.
<template>
<JqxChat ref="myChat" @error="onError($event)"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
function onError(event) {
alert('do something...');
}
</script>
|
|
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.
<template>
<JqxChat ref="myChat" @open="onOpen($event)"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
function onOpen(event) {
alert('do something...');
}
</script>
|
|
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.
<template>
<JqxChat ref="myChat" @close="onClose($event)"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
function onClose(event) {
alert('do something...');
}
</script>
|
|
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.
<template>
<JqxChat ref="myChat" @stop="onStop($event)"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
function onStop(event) {
alert('do something...');
}
</script>
|
|
create
# |
Event
|
|
This event is triggered when the widget is created and rendered.
Code examples #
Bind to the create event of jqxChat.
<template>
<JqxChat ref="myChat" @create="onCreate($event)"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
function onCreate(event) {
alert('do something...');
}
</script>
|
|
|
| Name | Arguments | Return Type |
|
sendMessage
# |
text
|
None
|
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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
const myChat = ref(null);
onMounted(() => {
myChat.value.sendMessage('Show me a code example');
});
</script>
|
|
stop
# |
None
|
None
|
Stops the in-progress generation. Any text streamed so far is kept in the conversation and the stop event is raised.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
const myChat = ref(null);
onMounted(() => {
myChat.value.stop();
});
</script>
|
|
addMessage
# |
role, content
|
None
|
Appends a message to the conversation and the view without contacting the provider.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
const myChat = ref(null);
onMounted(() => {
myChat.value.addMessage('assistant', 'Injected message.');
});
</script>
|
|
appendDelta
# |
delta
|
None
|
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.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
const myChat = ref(null);
onMounted(() => {
myChat.value.appendDelta('Hello');
});
</script>
|
|
getMessages
# |
None
|
Array
|
Returns a copy of the conversation history as an array of message objects.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
const myChat = ref(null);
onMounted(() => {
const value = myChat.value.getMessages();
});
</script>
|
|
clearConversation
# |
None
|
None
|
Clears the conversation and restores the empty state (welcome message and starter prompts).
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
const myChat = ref(null);
onMounted(() => {
myChat.value.clearConversation();
});
</script>
|
|
focus
# |
None
|
None
|
Moves keyboard focus to the message input. In popup mode, focus is applied only when the panel is open.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
const myChat = ref(null);
onMounted(() => {
myChat.value.focus();
});
</script>
|
Opens the popup panel and hides the launcher. Applies only when mode is 'popup'.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
const myChat = ref(null);
onMounted(() => {
myChat.value.openPopup();
});
</script>
|
Closes the popup panel and shows the launcher. Applies only when mode is 'popup'.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
const myChat = ref(null);
onMounted(() => {
myChat.value.closePopup();
});
</script>
|
|
toggle
# |
None
|
None
|
Toggles the popup panel open or closed. Applies only when mode is 'popup'.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
const myChat = ref(null);
onMounted(() => {
myChat.value.toggle();
});
</script>
|
|
val
# |
value
|
Array
|
Returns the conversation history as an array of message objects (alias of getMessages).
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
const myChat = ref(null);
onMounted(() => {
const value = myChat.value.val();
});
</script>
|
|
render
# |
None
|
None
|
Renders the widget.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
const myChat = ref(null);
onMounted(() => {
myChat.value.render();
});
</script>
|
|
refresh
# |
None
|
None
|
Refreshes the widget's layout (re-measures and re-sizes the message area).
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
const myChat = ref(null);
onMounted(() => {
myChat.value.refresh();
});
</script>
|
|
destroy
# |
None
|
None
|
Destroys the widget and removes it (and the popup launcher, if any) from the DOM.
<template>
<JqxChat ref="myChat"
:provider="'anthropic'" :model="'claude-opus-4-8'" :apiKey="'YOUR_KEY'"
:width="400" :height="580"
/>
</template>
<script setup>
import { onMounted, ref } from "vue";
import JqxChat from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxchat.vue';
const myChat = ref(null);
onMounted(() => {
myChat.value.destroy();
});
</script>
|