Thinking Bar
Thinking Bar is a React and Tailwind CSS component from Prompt Kit, licensed MIT. Copy it and paste it into your project.
Prompt Kit
MIT
other
What it is
Thinking Bar is a React and Tailwind CSS component from Prompt Kit, licensed MIT. Copy it and paste it into your project.
How to use it
Open it in the catalogue, press copy, and paste it into your project. The prompt you copy carries the code and the rules that tell your agent to reproduce it without changing anything.
Five free copies a month. No card.
Needs
npm i lucide-react
Licence
This component comes from Prompt Kit and is redistributed under the MIT licence, which permits commercial use. The copyright notice travels with the code.
Thinking Bar
"use client"
import { TextShimmer } from "@/components/prompt-kit/text-shimmer"
import { cn } from "@/lib/utils"
import { ChevronRight } from "lucide-react"
type ThinkingBarProps = {
className?: string
text?: string
onStop?: () => void
stopLabel?: string
onClick?: () => void
}
export function ThinkingBar({
className,
text = "Thinking",
onStop,
stopLabel = "Answer now",
onClick,
}: ThinkingBarProps) {
return (
<div className={cn("flex w-full items-center justify-between", className)}>
{onClick ? (
<button
type="button"
onClick={onClick}
className="flex items-center gap-1 text-sm transition-opacity hover:opacity-80"
>
<TextShimmer className="font-medium">{text}</TextShimmer>
<ChevronRight className="text-muted-foreground size-4" />
</button>
) : (
<TextShimmer className="cursor-default font-medium">{text}</TextShimmer>
)}
{onStop ? (
<button
onClick={onStop}
type="button"
className="text-muted-foreground hover:text-foreground border-muted-foreground/50 hover:border-foreground border-b border-dotted text-sm transition-colors"
>
{stopLabel}
</button>
) : null}
</div>
)
}