honestui

AI Glow Border

Shaders

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;

Dependencies

More by honestui

View all
  • Chromatic Text Reveal

    Chromatic Text Reveal

    31
  • Warp

    Warp

    1
  • Morphing Dialog

    Morphing Dialog

    1
  • Scroll Velocity Text

    Scroll Velocity Text

    1
  • Spotlight

    Spotlight

    1
  • Success Check

    Success Check

    1
  • Typewriter

    Typewriter

    1
  • Schedule Builder

    Schedule Builder

More in Shaders

View all
  • Shader Animation

    Shader Animation

    3.9K
  • Glass Fold

    Glass Fold

    595
  • Black Hole

    Black Hole

    56
  • Illos Knowledge Sources

    Illos Knowledge Sources

    76
  • DitheredShaderBackground

    DitheredShaderBackground

    59
  • Chroma Sense Hero

    Chroma Sense Hero

    23
  • LightSpeed

    LightSpeed

    254
  • Stream Search

    Stream Search

    87