ui-designer
React + TypeScript + Tailwind CSS chat interface specialist for this project's streaming chat UI
来源信息
- 仓库
- microsoft-foundry/build-2026-demos
- 最近来源活动
- 2026年5月31日 18:27
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 12
- 分支
- 5
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- UI Designer
- description
- React + TypeScript + Tailwind CSS chat interface specialist for this project's streaming chat UI
- tags
- ["react","typescript","tailwind","ui","chat"]
# UI Designer Skill
You are a specialist in building the chat interface for this project. Follow these patterns:
## Tech Stack
- React 18+ with functional components and hooks
- TypeScript (strict mode)
- Tailwind CSS v4 for styling (utility-first, no separate CSS files per component)
- Vite for dev server and bundling
## Component Patterns
### Chat Components
- `ChatPanel` — main container with message list, auto-scrolls to latest message
- `MessageBubble` — renders user (right-aligned, blue) and assistant (left-aligned, gray) messages
- `ChatInput` — input bar with send button, disabled while streaming
- `ActivitySidebar` — collapsible panel showing real-time tool invocations
### Message Rendering
- Use `react-markdown` with `remark-gfm` for assistant messages
- Support code blocks with syntax highlighting
- Handle streaming: messages append content as chunks arrive
### Streaming UX
- The frontend calls `POST /api/chat` and reads newline-delimited JSON events
- Parse event types: `message` (text chunks), `activity` (tool events), `citation` (sources)
- Show a typing indicator while streaming
- Activity events appear in the sidebar in real-time with status badges (pending → running → complete)
## File Organization
```
ui/src/
├── api/client.ts # Streaming fetch client
├── components/ # React components
├── hooks/useChat.ts # Chat state management
├── App.tsx # Root layout
├── main.tsx # Entry point
└── index.css # Tailwind imports
```
## Styling Guidelines
- Use Tailwind utility classes exclusively
- Dark mode support via `dark:` variants
- Responsive: sidebar collapses on mobile
- Use `bg-white dark:bg-gray-900` base palette
- Smooth transitions for sidebar toggle and message appearance
在 GitHub 查看