Skip to content

ThreadTemplate

Stable

A conversation that scrolls, with the message box fixed at the bottom.

Also known as chat layout, chat page layout

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

A conversation with a message box

Onboarding email draft

Draft a welcome email for new customers.
Assistant: Here is a short draft you can adapt.

AI can make mistakes. Check important information.

The title sits above the conversation. Messages scroll while the message box stays put.

When to use it

A conversation that scrolls, with the message box fixed at the bottom. Both share one width, so the text people read and the box they type in line up.

Made of: Title row · Scrolling conversation · Message box at the bottom · Note

Use it for

  • Any chat once the first message is sent.
  • A running workflow shown as a conversation, with checklists and approval requests.
  • A screen with a title bar and controls such as Share.

Not for

Do and avoid

Lisbon trip

Are bags free on my Lisbon flight?
Assistant: Yes. One bag up to 20 kg is free on this fare.
Do. The chat scrolls while the message box stays fixed at the bottom.

Lisbon trip

Are bags free on my Lisbon flight?
Assistant: Yes. One bag up to 20 kg is free on this fare.
Are bags free on my Lisbon flight?
Assistant: Yes. One bag up to 20 kg is free on this fare.
Avoid. The message box sits inside the chat, so it scrolls out of view.

Do

  • Place it directly inside AppShell so it fills the main area.
  • Wrap messages in MessageList so screen readers announce new ones.
  • Use it for workflows too. It can hold a checklist, steps and approval requests.
  • Use the note for the AI notice so it stays close to the input.

Avoid

  • Do not put it in a space with no set height. The conversation cannot scroll and the message box will not stay at the bottom.
  • Do not put the message box inside the conversation. It would scroll away.
  • Do not give the conversation a different width. The shared width keeps text and input lined up.

On a phone

  • Side padding is 1rem on a phone and 1.5rem from the sm breakpoint, and the column is capped at 48rem.
  • The messages scroll in their own area while the composer stays at the bottom.
  • The composer area adds the bottom safe area to its padding, so it clears the home bar on a phone.

Build your next AI screen with Tattva.

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

Get started