Skip to content

PromptIndex

Stable

A short list of the person's own messages in a long thread, so they can jump back to one.

Also known as prompt navigator, message index, table of contents

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

List in a side panel

The plain list. Use it inside a side panel or your own sheet. The current question is marked.

When to use it

Long threads bury the person's own questions. This gives them a way back to any one of them without scrolling through every answer.

Made of: Navigation with a name · Heading (list) · Item button · Mark · Question text (one line) · Time · Questions button and sheet (rail, on a phone)

Use it for

  • A long chat or agent thread where people want to return to an earlier question.
  • A side panel or sheet that lists the questions in this thread.
  • A quiet rail on the right edge of a wide thread view.

Not for

Do and avoid

Do. Your own questions, one line each, ready to jump back to.
Avoid. Listing the AI's answers buries the questions people want to find.

Do

  • Move focus to the message after a jump, not just the scroll position.
  • Keep currentId in step with scrolling, so the rail shows where the person is.
  • Use the rail on wide thread views and the list in side panels.

Avoid

  • Do not list the AI's answers. This is the person's own questions.
  • Do not use it to switch conversations.
  • Do not put the rail over text the person needs to read; leave room on the right of the thread.

On a phone

  • Below the sm breakpoint the rail is hidden and a Questions button with the count is shown in its place.
  • The button opens the list in a bottom sheet, one question per row, and the sheet closes after a jump.
  • Every item grows to at least 44px tall on a touch screen. The Questions button keeps its size and has a 44px tap area.
  • On a wider touch screen the first tap on the rail only opens it; a second tap on a question jumps. Tapping elsewhere closes it.

Build your next AI screen with Tattva.

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

Get started