# @intentface/chat This is the documentation for the `@intentface/chat` package. It provides headless, unstyled React primitives for building AI chat interfaces — a rich-text composer, thread scroll ownership, message segmentation, and streaming disclosure. Styling is entirely the consumer's. Every page below is markdown; append `.md` to any docs URL to fetch the same content. Demo source is inlined into those pages. The demos are written for Tailwind CSS v4. If `package.json` uses Tailwind CSS v3, convert unsupported utilities to v3-compatible equivalents. ## Documentation - [Introduction](https://ui.intentface.com/index.md): An unstyled React primitive library for building AI chat interfaces. - [Quick start](https://ui.intentface.com/quick-start.md): Install the package, set it up, and assemble your first chat. - [Build a chat](https://ui.intentface.com/build-a-chat.md): Four stages from an empty page to a streaming chat, one primitive at a time. ## Handbook - [Styling](https://ui.intentface.com/handbook/styling.md): Data attributes, state callbacks, and the render prop. - [Composition](https://ui.intentface.com/handbook/composition.md): Composing the primitives with your own React components using the render prop. - [Accessibility](https://ui.intentface.com/handbook/accessibility.md): The accessibility features the primitives provide, and what your application still has to supply. ## Primitives - [Composer](https://ui.intentface.com/primitives/composer.md): Rich-text chat input with chips, slash/mention commands, attachments, and an ask-user flow. - [Message](https://ui.intentface.com/primitives/message.md): A role-aware container for one turn, with chip-segmented text and selection hooks. - [Thread](https://ui.intentface.com/primitives/thread.md): The scroll container — at-bottom detection, auto-follow, docked-composer measurement, and prepend-aware restoration. - [Steps](https://ui.intentface.com/primitives/steps.md): A collapsible timeline of a run — reasoning, tool calls, and answered questions as chronological steps. - [Reasoning](https://ui.intentface.com/primitives/reasoning.md): A collapsible reasoning disclosure that tracks streaming state and elapsed duration. - [Chip](https://ui.intentface.com/primitives/chip.md): An inline, text-flowing token — used for mentions in the composer and reconstructed chips in messages. - [Attachments](https://ui.intentface.com/primitives/attachments.md): The attachment tray — structural slots for items, a remove affordance, a drop zone, and a file picker.