|
1 |
| -# MateChat React |
| 1 | +<div align="center"> |
| 2 | + <h1>MateChat React</h1> |
| 3 | +</div> |
2 | 4 |
|
3 |
| -MateChat React is the React version of [MateChat](https://gitcode.com/DevCloudFE/MateChat), a front-end AI scenario solution UI library based on Huawei DevUI Design. |
| 5 | +<div align="center"> |
4 | 6 |
|
5 |
| -## Installation |
| 7 | +MateChat React is the React version of [MateChat](https://github.com/DevCloudFE/MateChat), a front-end AI scenario solution UI library based on Huawei DevUI Design. |
| 8 | + |
| 9 | + |
| 10 | +[](https://www.npmjs.com/package/@matechat/react) |
| 11 | +[](https://www.npmjs.com/package/@matechat/react) |
| 12 | +[](./LICENSE) |
| 13 | + |
| 14 | +</div> |
| 15 | + |
| 16 | +<div align="center"> |
| 17 | + |
| 18 | +[English](./README.md) | [简体中文](./README.zh-CN.md) |
| 19 | + |
| 20 | +</div> |
| 21 | + |
| 22 | +--- |
| 23 | + |
| 24 | +## Introduction |
| 25 | + |
| 26 | +**MateChat React** is a React component library designed for AI-driven interfaces, such as chat assistants, prompt tools, agent frameworks, and more. It is the React version of [MateChat](https://github.com/DevCloudFE/MateChat), offering consistent features and styles. |
| 27 | + |
| 28 | +MateChat is based on [Huawei DevUI Design](https://devui.design/), offering a modern visual language, consistent user experience, and excellent scalability. |
| 29 | + |
| 30 | +## Features |
| 31 | + |
| 32 | +- 🧠 Built for AI interaction and prompt use-cases |
| 33 | +- 🎨 Based on DevUI design system |
| 34 | +- ⚛️ Fully typed React + TypeScript components |
| 35 | +- 🌗 Built-in light/dark theme switching |
| 36 | +- 🔌 Highly customizable & flexible |
| 37 | + |
| 38 | +--- |
| 39 | + |
| 40 | +## Quick Start |
6 | 41 |
|
7 | 42 | ```bash
|
8 |
| -npm install --save @matechat/react |
9 |
| -# or |
| 43 | +# npm |
| 44 | +npm install @matechat/react |
| 45 | + |
| 46 | +# or pnpm |
10 | 47 | pnpm add @matechat/react
|
11 | 48 | ```
|
12 | 49 |
|
| 50 | +```tsx |
| 51 | +import { Bubble } from '@matechat/react'; |
| 52 | +import avatar from './avatar.png'; |
| 53 | + |
| 54 | +export default function BubbleDemo() { |
| 55 | + return ( |
| 56 | + <div className="bubble-chat"> |
| 57 | + <div className="bubble-row left"> |
| 58 | + <img src={avatar} alt="Bot" className="avatar" /> |
| 59 | + <Bubble text="Hello, how can I help you?" /> |
| 60 | + </div> |
| 61 | + <div className="bubble-row right"> |
| 62 | + <Bubble text="I want to know the product features!" /> |
| 63 | + <img src={avatar} alt="User" className="avatar" /> |
| 64 | + </div> |
| 65 | + <div className="bubble-row left"> |
| 66 | + <img src={avatar} alt="Bot" className="avatar" /> |
| 67 | + <Bubble text="OK, please wait..." isPending /> |
| 68 | + </div> |
| 69 | + </div> |
| 70 | + ); |
| 71 | +} |
| 72 | +``` |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +## Development |
| 77 | + |
| 78 | +```bash |
| 79 | +git clone https://github.com/matechat/matechat-react.git |
| 80 | +cd matechat-react |
| 81 | +pnpm install |
| 82 | +pnpm dev |
| 83 | +``` |
| 84 | + |
| 85 | +Build the library: |
| 86 | + |
| 87 | +```bash |
| 88 | +pnpm build |
| 89 | +``` |
| 90 | + |
| 91 | +--- |
| 92 | + |
13 | 93 | ## Documentation
|
14 | 94 |
|
15 | 95 | The documentation is still in progress, but you can feel free to create a new issue in [GitCode](https://gitcode.com/DevCloudFE/MateChat/issues) or [GitHub](https://github.com/DevCloudFE/MateChat/issues) to submit your questions or suggestions. This project is still under development, so the documentation is not complete yet, some features may change in the future.
|
16 | 96 |
|
17 | 97 | For more information, please track the progress in [#4](https://github.com/DevCloudFE/matechat-react/issues/4) and [#5](https://github.com/DevCloudFE/MateChat/issues/5).
|
18 | 98 |
|
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | +## Star History |
| 104 | + |
| 105 | +[](https://www.star-history.com/#DevCloudFE/matechat-react&Date) |
| 106 | + |
| 107 | +--- |
| 108 | + |
| 109 | +## Contribution |
| 110 | + |
| 111 | +We welcome all kinds of contributions: |
| 112 | + |
| 113 | +* File issues for bugs or features |
| 114 | +* Create pull requests |
| 115 | +* Help with documentation or translations |
| 116 | + |
| 117 | + |
| 118 | +**Contributors:** |
| 119 | + |
| 120 | +<a href="https://github.com/DevCloudFE/matechat-react/graphs/contributors"> |
| 121 | + <img src="https://contrib.rocks/image?repo=DevCloudFE/matechat-react" /> |
| 122 | +</a> |
| 123 | + |
| 124 | +--- |
| 125 | + |
19 | 126 | ## Contact Us
|
20 | 127 |
|
21 | 128 | | MateChat React Chat Group | SOA Chat Group |
|
|
0 commit comments