Thinking Bar

A component for displaying AI thinking state with animated shimmer text and optional stop button

Installation

Copy and paste the following code into your project.

pnpm dlx shadcn-svelte@latest add https://svelte-ai-elements.vercel.app/p/thinking-bar.json

Examples

Basic thinking bar

Thinking

With stop button

Add a stop button using the onStop callback. Customize the button label with stopLabel.

Analyzing your question

Component API

ThinkingBar

ThinkingBar

PropTypeDefaultDescription
textstring"Thinking"Text to display with shimmer effect
onStop() => void-Callback when stop button is clicked
stopLabelstring"Answer now"Label for the stop button
onclick() => void-Callback when thinking text is clicked (shows chevron when set)
classNamestring-Additional CSS classes
...propsHTMLAttributes<HTMLDivElement>-All other div props are supported