Skip to content

ThreadPage

Stable

A full answer with the assistant's thinking, the steps it took, sources and feedback.

Also known as chat page, conversation page

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

Full page

Why sales grew last quarter

What made sales grow last quarter?
Assistant:

Sales grew 12% over the last quarter, mostly from big business customers.1 About 2.1% of customers left, the same as before.2

| Customers | Growth | |---|-

AI can make mistakes. Check important information.

The reply is written when the page loads. Press Stop to interrupt it, or send a message to start another.

When to use it

A worked example of one full answer: thinking, a step the assistant took, the reply as it is written, then sources and feedback. The extras wait until the reply ends, so the page does not jump.

Made of: Side panel · Title · Your message · Thinking section · Card for a step the assistant took · The reply, as it is written · How sure the assistant is · Sources · Message actions · Feedback bar · Suggestion chips · Message box · AI notice

Use it for

  • A starting point for a research or question-and-answer screen.
  • Seeing the order of thinking, steps, answer, sources and feedback.
  • Seeing how Stop, streaming text and follow-up suggestions work together.

Not for

Do and avoid

Assistant: Sales grew 12% last quarter, mostly from big customers.

Do. Fragment: feedback shows up only after the reply has finished.
Assistant: Sales grew 12% last quarter, mostly from

Avoid. Feedback under a half-written reply asks people to judge too soon.

Do

  • Copy the order: thinking, steps taken, answer, then how sure it is, sources and actions.
  • Show the extras only when the reply is finished.
  • Put source numbers in the reply so they link to the source cards.
  • Show follow-up suggestions after the last reply, and hide them while a reply is being written.

Avoid

  • Do not show feedback or actions while the reply is still being written.
  • Do not put the message box inside the scrolling conversation. ThreadTemplate keeps it at the bottom.
  • Do not use the sample reply in your real product. Swap in your own.

On a phone

  • The sidebar opens from a Menu button in a side sheet on a phone, and the page shows the conversation.
  • Messages, sources and the composer fit one column, and the composer stays at the bottom while the messages scroll.
  • The page is 45rem tall at most and never taller than the phone screen height. The composer area clears the bottom safe area.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started