Ai chatbot message

AI chatbot message with avatar and loading state, for conversational threads

Contents

With no loadingPhrases, the loading state is a plain "Thinking".

AI chatbot avatar
Thinking

Pass loadingPhrases to cycle through them instead, one every loadingPhraseIntervalMs, starting at the first phrase.

AI chatbot avatar
Reading your brief.
Inputs in Loading phrases
loadingPhraseIntervalMs ?: number = 3000

How long each loading phrase holds before the next one fades in.

loadingPhrases ?: readonly string[] = []

Phrases cycled in order while `isLoading`, starting at the first. If empty, the message falls back to a plain "Thinking".

Also set in this example
isLoading ?: boolean = false