Conversation.
Follows the reply, lets the reader wander.
A chat transcript that keeps the newest text in view while it streams, and lets go as soon as the reader scrolls up. A button returns them to the latest message. Status changes are announced once each, never token by token.
Make it yours
Preparing the example…
Composition
AnatomyContent is the scroll container, so the page around it stays still. Keep it mounted; swap what is inside it. Root announces Sending, Responding and Response complete through one polite status region.
Conversation.Root (status) — relative frame + role=status announcer
├── Conversation.Content — role=log, aria-live=off, tabIndex=0, scrolls
│ ├── Conversation.EmptyState (title, description) — when empty
│ └── Message.Root …
└── Conversation.ScrollButton — only while away from the endA place to start
UsageImport the stylesheet once at your application root. This complete example reflects the properties selected above.
Loading example…
Details that make a difference
Examples & statesThe finer details
API referenceGenerated from Dixy’s local TypeScript interfaces. Native HTML attributes and refs are forwarded. The table covers Dixy’s own options.
ConversationRoot
| Prop | Type / description | Default |
|---|---|---|
status | ChatStatusRequest state. Changes are announced politely, once each, so assistive technology hears "Responding" and "Response complete" rather than every streamed token. | — |
statusLabels | ConversationStatusLabelsOverride the announced status messages. | — |
ConversationContent
| Prop | Type / description | Default |
|---|---|---|
aria-label | stringAccessible name of the message log. | Conversation |
ConversationScrollButton
| Prop | Type / description | Default |
|---|---|---|
aria-label | stringAccessible name. | Scroll to latest message |
children | ReactNode | — |
ConversationEmptyState
| Prop | Type / description | Default |
|---|---|---|
title | ReactNodeThe headline, e.g. "What can I help with?" | — |
description | ReactNodeA supporting line. | — |
icon | ReactNodeDecorative mark above the title. | — |
Built from the same foundations
Styling tokensChange Theme settings above to compare appearance, accent, neutral, radius, spacing density, motion and direction. Override component aliases on a Theme root so custom properties follow portaled content too. The wrapper merges className, style, refs and render composition with its owning primitive.
| Token | Purpose |
|---|---|
--dixy-shadow-floating | The component-specific starting point. |
--dixy-font-label-md | Control label font and line height; body roles remain readable in text inputs. |
--dixy-color-background-selected | Selected surfaces use semantic color across appearances. |
--dixy-color-border-focus | Focus indication remains visible independently of shadows. |
--dixy-spacing-inset-sm | Density-aware component padding. |
--dixy-motion-transition-feedback | Short state feedback, reduced by the inherited motion setting. |
Consider everyone
AccessibilityThe log is role=log with aria-live=off: a live log would read every streamed token. Root announces status changes once each instead. The log is keyboard focusable because it scrolls. The scroll button moves focus into the log as it disappears, so focus never drops to the page.
Target: WCAG 2.2 AA. Automated tests cover selected behavior; manual screen-reader, contrast, and zoom validation remain part of the release checklist.
Build it. Then understand it.
Following a stream is an instant scroll on every growth, because smooth scrolling lags each token and jitters. Scroll events arrive too late to notice a small upward nudge, so wheel, touch and key intent release the pin first.
--dixy-shadow-floating