Skip to content
kitn AI/UI

Thinking Bar

kai-thinking-bar

A shimmering “thinking” indicator that signals the assistant is still reasoning. Add stoppable and it gains a stop button that fires kai-stop so users can skip to an answer.

  • Shadow DOM
  • Animated shimmer
  • Optional stop affordance
  • 1 event
  • Fully attribute-driven
<kai-thinking-bar text="Thinking" stoppable stop-label="Answer now"></kai-thinking-bar>

All three props are attributes — no JavaScript needed.

  • stoppable — bare boolean attribute; shows the stop button.
  • kai-stop — fires with no payload when the stop button is clicked; cancel the in-flight request in your handler.

Remove the element from the DOM once the assistant reply arrives.

Override text for a specific task like web search or code analysis.

PropertyTypeDefaultNotes
text 'Thinking' The shimmering label, e.g. "Thinking…".
stoppable false When true, show a "stop" affordance that fires a `stop` event.
stopLabel 'Answer now' Label for the stop affordance.
EventDetailNotes
The "stop / answer now" affordance was clicked.

This element wraps these SolidJS components — reach for them directly when you need finer control than the props expose.

ThinkingBar