TidalUI

Chat thread preview

A message history that follows new replies while preserving your place in older messages.

pro · Blocks · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/chat-thread

Import components/ui/tidal.css, components/ui/chat-thread.css. Wrap installed components in tidal-scope.

Preview

Chat thread component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/chat-thread.css";
import{TidalChatThread}from"./components/ui/chat-thread";
export default()=><div className="tidal-scope"><TidalChatThread label={"Demo"} messages={[{id:"example",author:"value",content:"value"}]}/></div>;

API and props

TidalChatThread.label (required)
string

Required label value accepted by this exported component.

TidalChatThread.messages (required)
ReadonlyArray<TidalChatMessage>

Required messages value accepted by this exported component.

TidalChatThread.announceUpdates
boolean | undefined

Optional announce updates value accepted by this exported component.

TidalChatThread.emptyMessage
ReactNode

Optional empty message value accepted by this exported component.

TidalChatThread.followLatest
boolean | undefined

Optional follow latest value accepted by this exported component.

TidalChatThread.initialScroll
"start" | "end" | undefined

Optional initial scroll value accepted by this exported component.

TidalChatThread.maxHeight
number | undefined

Optional max height value accepted by this exported component.

TidalChatThread.title
ReactNode

Optional title value accepted by this exported component.

TidalChatThread.viewportProps
Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "role" | "aria-atomic" | "aria-label" | "aria-live" | "aria-relevant" | "children"> | undefined

Optional viewport props value accepted by this exported component.

TidalChatThread.viewportRef
Ref<HTMLDivElement> | undefined

Optional viewport ref value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas