About
Light the edge of a prompt bar while an assistant thinks and replies, and fade it out when the reply is done.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds AI Glow Border to your project and fits it to your theme.
Code
How AI Glow Border is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import "honestui/theme.css";
import { ArrowUp, Paperclip } from "honestui/icons";
import AiGlowBorder, { type AiGlowBorderState } from "@/components/ui/honest-ai-glow-border";
interface AiGlowBorderSettings {
state: AiGlowBorderState;
palette: "spectrum" | "mono";
intensity: number;
bloom: number;
thickness: number;
speed: number;
}
const defaults: AiGlowBorderSettings = {
state: "thinking",
palette: "spectrum",
intensity: 0.6,
bloom: 18,
thickness: 1.25,
speed: 1,
};
const stateOptions = [
{ label: "Idle", value: "idle" },
{ label: "Thinking", value: "thinking" },
{ label: "Streaming", value: "streaming" },
{ label: "Error", value: "error" },
] as const;
const paletteOptions = [
{ label: "Spectrum", value: "spectrum" },
{ label: "Mono", value: "mono" },
] as const;
const statusText: Record<AiGlowBorderState, string> = {
idle: "Ready",
thinking: "Thinking…",
streaming: "Writing a reply…",
error: "The reply failed",
};
export function AiGlowBorderDemo() {
const settings = defaults;
return (
<div data-theme="light" className="flex min-h-[420px] w-full items-center justify-center p-6">
<div className="h-80 w-full max-w-xl overflow-hidden rounded-xl">
<div className="bg-background flex size-full items-center justify-center p-8 sm:p-12">
<AiGlowBorder className="w-full max-w-md" {...settings}>
<div className="flex flex-col gap-[var(--hui-space-2)] rounded-[20px] border-[0.5px] border-[var(--hui-color-border-base-secondary)] bg-[var(--hui-color-background-base-primary)] p-[var(--hui-space-3)] shadow-[var(--hui-shadow-soft)]">
<p className="m-0 min-h-10 px-[var(--hui-space-2)] pt-[var(--hui-space-1)] text-[var(--hui-color-foreground-base-secondary)] [font-size:var(--hui-font-size-regular)]">
Summarize last week’s support tickets
</p>
<div className="flex items-center justify-between">
<span className="flex size-8 items-center justify-center rounded-[var(--hui-radius-2)] text-[var(--hui-color-foreground-base-secondary)]">
<Paperclip aria-hidden className="size-4" />
</span>
<span className="flex items-center gap-[var(--hui-space-3)]">
<span
role="status"
className="text-[var(--hui-color-foreground-base-secondary)] [font-size:var(--hui-font-size-small)]"
>
{statusText[settings.state]}
</span>
<span className="flex size-8 items-center justify-center rounded-full bg-[var(--hui-color-foreground-base-primary)] text-[var(--hui-color-background-base-primary)]">
<ArrowUp aria-hidden className="size-4" />
</span>
</span>
</div>
</div>
</AiGlowBorder>
</div>
</div>
</div>
);
}
export default AiGlowBorderDemo;
















