Skip to content
AI Agents Fancy Stable

ThinkingIndicator

.md

Live agent status line with a shimmering activity label and an elapsed timer, as a bare inline row or a bordered status pill

Available for Svelte 5, React, and Vue 3.

Preview

Installation

pnpm add fancy-ui-svelte
import { ThinkingIndicator } from "fancy-ui-svelte";

Usage

svelte
<script lang="ts">
	import { ThinkingIndicator } from "fancy-ui-svelte";

	// Both live rows started when this example mounted, so their timers climb
	// from zero while you read the page.
	const startedAt = Date.now();
</script>

<div class="flex w-full flex-col items-start gap-6">
	<ThinkingIndicator status="Reading files" since={startedAt} />

	<ThinkingIndicator variant="pill" status="Searching the web" since={startedAt - 8000} />

	<!-- Finished: the shimmer stops and the `done` snippet takes over the label. -->
	<ThinkingIndicator status="Reading files" running={false} showElapsed={false}>
		{#snippet done()}
			Thought for 12s
		{/snippet}
	</ThinkingIndicator>
</div>

Examples

Basic Usage

Props

PropTypeDefaultDescription
status *string-What the agent is doing right now, e.g. "Reading files"
running booleantrueWhether the activity is in flight: drives the shimmer and the live timer
variant "inline" | "pill""inline"Bare text row, or a bordered chip with a leading pulse dot
since number-Epoch ms the activity started; the internal stopwatch ticks from it
elapsedMs number-Externally-driven elapsed time in ms; overrides the internal stopwatch
showElapsed booleantrueShow the elapsed duration alongside the status

Slots

SlotDescription
done Rendered instead of the status label once running is false