Documentation
ChatScreen
Panel-less message history and a 200×20 input.
- <Steve> 大家好多钻石!
- <Alex> 小心苦力怕
- Steve 加入了游戏
import { ChatScreen } from "./index";
/**
* ChatScreen 预览用例(规格 §6.3)
*/
export function ChatScreenDemo() {
return (
<ChatScreen
messages={[
{ author: "Steve", text: "大家好多钻石!" },
{ author: "Alex", text: "小心苦力怕" },
{ text: "Steve 加入了游戏" },
]}
/>
);
}
Install
CLI copy
$npx shadcn add @tennantite/chat-screennpm install
$pnpm add @tennantite/uinpm installs the compiled package; use the CLI copy above to adapt the source.
Source
packages/ui/src/screens/menus/chat-screen/index.tsxThe npm package keeps the source tree, so you can copy and adapt it directly.