Chat

A production-grade conversational chat component with thread history sidebar, rich message rendering, status indicators, file attachments, and auto-expanding composer.

AI Assistant

Claude 3.7 Sonnet

Alex· 10:41 AM
Can you show me how to compose an accessible data table in EasyUI?
EasyAI Assistant· 10:42 AM
Certainly! EasyUI provides a fully compound <DataTable> component with sorting, searching, selection, and responsive pagination:
tsx
<DataTable data={users} columns={columns}>
  <DataTableToolbar title="Team Directory" />
  <DataTableFilters />
  <DataTableContent />
  <DataTablePagination />
</DataTable>
It adheres to strict monochromatic styling and supports full keyboard navigation out of the box.

Installation

Add the component directly to your repository using shadcn CLI:

npx shadcn@latest add Surajmaurya1/easyui/chat

API Reference

PropTypeDefaultDescription
messagesChatMessageItem[][]Array of chat message records including role, content, author, and attachments
onSendMessage(content: string, attachments?: ChatAttachment[]) => voidundefinedCallback fired when the user submits a message via composer
isGeneratingbooleanfalseDisables composer and shows loading status while the assistant is synthesizing an answer
threadsChatConversationThread[]undefinedOptional list of historical conversations displayed in the sidebar
activeThreadIdstringundefinedID of the currently selected conversation thread
onSelectThread(threadId: string) => voidundefinedCallback fired when a user selects a thread from the history sidebar
onNewChat() => voidundefinedCallback fired when the user clicks the New Conversation button
onClearChat() => voidundefinedCallback fired when the user clicks the clear chat history button
classNamestringundefinedCustom Tailwind class names for styling overrides