Utility
Terminal
Installation
$ pnpm dlx shadcn@latest add @termcn/ink/chat-thread
Usage
import { ChatThread } from "@/components/ui/chat-thread";
import { ChatMessage } from "@/components/ui/chat-message";<ChatThread maxHeight={20}>
<ChatMessage sender="user">How do I center a div?</ChatMessage>
<ChatMessage sender="assistant">
Use flexbox: display flex, justify-content center, align-items center.
</ChatMessage>
</ChatThread>API Reference
ChatThread
| Prop | Type | Default |
|---|---|---|
maxHeight | number | - |
autoScroll | boolean | true |
children | ReactNode | - |
Notes
Accessibility
termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim.
- Screen reader: Ink labels and semantic state expose the component without relying on visual styling alone.