← 开源
alibaba

ChatUI

The UI design language and React library for Conversational UI

AI EngineeringBuild agent UITypeScript
在 GitHub 打开
增长势头
+124 小时新增 Star+0.0%
4.46k
Star
427
Fork
+4
本周
4
贡献者
创建于 2020-08-04 · 更新于 2026-10-17 · 今日第 4313 名
主要开发者
akaialibaba-ossjessiehan
README

The UI design language and React library for Conversational UI

Website:https://chatui.io

English | 简体中文

Features

  • 😎 Best Practices: The best practice for chat interaction based on our experience of Alime Chatbot
  • 🛡 TypeScript: Written in TypeScript with predictable static types
  • 📱 Responsive: Responsive design to adapt automatically to whatever device
  • ♿ Accessibility: Accessibility support and get the certification from Accessibility Research Association
  • 🎨 Theming: Powerful theme customization in every detail
  • 🌍 International: Internationalization support for dozens of languages

Environment Support

|
Edge |
Firefox |
Chrome |
Safari |
iOS Safari |
Android WebView | | --- | --- | --- | --- | --- | --- | | 16+ | 31+ | 49+ | 9.1+ | 9.3+ | 6+ |

Install

npm install @chatui/core --save
yarn add @chatui/core

Usage

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 ;
  }

  return (
    
  );
};

Development

cd demo
npm i
npm run dev

Theme

Visit Customize Theme for detail

Internationalization

Visit i18n for detail

License

MIT

排名相邻
同类项目