The UI design language and React library for Conversational UI
See the codeThe UI design language and React library for Conversational UI
Website:https://chatui.io
English | 简体中文
![]() Edge | ![]() Firefox | ![]() Chrome | ![]() Safari | ![]() iOS Safari | ![]() Android WebView |
|---|---|---|---|---|---|
| 16+ | 31+ | 49+ | 9.1+ | 9.3+ | 6+ |
npm install @chatui/core --save
yarn add @chatui/core
import Chat, { Bubble, useMessages } from '@chatui/core';
import '@chatui/core/dist/index.css';
const App = () => {
const { messages, appendMsg, setTyping } = useMessages([]);
function handleSend(type, val) {
if (type === 'text' && val.trim()) {
appendMsg({
type: 'text',
content: { text: val },
position: 'right',
});
setTyping(true);
setTimeout(() => {
appendMsg({
type: 'text',
content: { text: 'Bala bala' },
});
}, 1000);
}
}
function renderMessageContent(msg) {
const { content } = msg;
return <Bubble content={content.text} />;
}
return (
<Chat
navbar={{ title: 'Assistant' }}
messages={messages}
renderMessageContent={renderMessageContent}
onSend={handleSend}
/>
);
};
cd demo
npm i
npm run dev
Visit Customize Theme for detail
Visit i18n for detail
MIT
959 followers · starred Dec 2025
12,492 followers · starred Nov 2025
7 followers · starred Apr 2021
88 followers · starred May 2024
The UI design language and React library for Conversational UI
See the codeThe UI design language and React library for Conversational UI
Website:https://chatui.io
English | 简体中文
![]() Edge | ![]() Firefox | ![]() Chrome | ![]() Safari | ![]() iOS Safari | ![]() Android WebView |
|---|---|---|---|---|---|
| 16+ | 31+ | 49+ | 9.1+ | 9.3+ | 6+ |
npm install @chatui/core --save
yarn add @chatui/core
import Chat, { Bubble, useMessages } from '@chatui/core';
import '@chatui/core/dist/index.css';
const App = () => {
const { messages, appendMsg, setTyping } = useMessages([]);
function handleSend(type, val) {
if (type === 'text' && val.trim()) {
appendMsg({
type: 'text',
content: { text: val },
position: 'right',
});
setTyping(true);
setTimeout(() => {
appendMsg({
type: 'text',
content: { text: 'Bala bala' },
});
}, 1000);
}
}
function renderMessageContent(msg) {
const { content } = msg;
return <Bubble content={content.text} />;
}
return (
<Chat
navbar={{ title: 'Assistant' }}
messages={messages}
renderMessageContent={renderMessageContent}
onSend={handleSend}
/>
);
};
cd demo
npm i
npm run dev
Visit Customize Theme for detail
Visit i18n for detail
MIT
959 followers · starred Dec 2025
12,492 followers · starred Nov 2025
7 followers · starred Apr 2021
88 followers · starred May 2024