Feedback

AI Insight

Eyebrow, concise headline and reason. The compact form fits one line in tables and toolbars.

lucide-react

Preview

AI insightUpdated 2h ago
Strong fit — 92% ICP match

Recently raised a Series B and opened 6 SDR roles — outbound capacity is a stated priority.

Strong fit — 92% ICP matchRecently raised a Series B and opened 6 SDR roles

Installation

Components are copied into your project — no runtime package.

  1. Install the following dependencies:

    terminal
    npm install lucide-react
  2. Create a ai-insight.tsx file and paste the following code into it.

    src/components/ui/ai-insight.tsx
    import { Sparkles } from "lucide-react";
    import type { ReactNode } from "react";
    import { cx } from "@/utils/cx";
    
    export interface AIInsightProps {
      headline: ReactNode;
      reason?: ReactNode;
      eyebrow?: string;
      meta?: ReactNode;
      /** One line inside tables, drawers and composer toolbars. */
      compact?: boolean;
      className?: string;
    }
    
    /** Default: eyebrow + concise headline + reason. Compact: one line. */
    export function AIInsight({ headline, reason, eyebrow = "AI insight", meta, compact, className }: AIInsightProps) {
      if (compact) {
        return (
          <div className={cx("flex h-8 min-w-0 items-center gap-2 rounded-sm border border-accent-soft-border bg-accent-soft px-2.5 text-sm", className)}>
            <Sparkles aria-hidden className="size-3.5 shrink-0 text-accent" />
            <span className="shrink-0 font-medium text-fg">{headline}</span>
            {reason && <span className="truncate text-fg-secondary">{reason}</span>}
          </div>
        );
      }
      return (
        <div className={cx("rounded-md border border-accent-soft-border bg-accent-soft p-3.5", className)}>
          <div className="flex items-center gap-1.5 text-sm">
            <Sparkles aria-hidden className="size-3.5 text-accent" />
            <span className="font-medium text-accent-text">{eyebrow}</span>
            {meta && <span className="ml-auto text-fg-muted">{meta}</span>}
          </div>
          <div className="mt-2 text-base font-medium text-fg">{headline}</div>
          {reason && <p className="mt-1 text-sm text-fg-secondary">{reason}</p>}
        </div>
      );
    }
  3. Add the theme tokens and the cx helper from Installation if you haven’t yet, then update the import paths to match your project setup.