Ai chatbot message

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

Contents

By default, the dots style puts three staggered bouncing dots at the end of the phrase.

AI chatbot avatar
Getting to work.

On the other hand, the spin style replaces the bouncing dots with the chatbot's turning eyes at the start of the phrase.

AI chatbot avatar
Getting to work.
AI chatbot avatar

What type of website do you need?

Either style can run with showAvatar off.

Getting to work.
Inputs in Loading style
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".

loadingStyle ?: "spin" | "dots" = 'dots'
showAvatar ?: boolean = true
Also set in this example
isLoading ?: boolean = false
text ?: string = ''