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
import { AIInsight } from "@/components/ui/ai-insight";
export default function Example() {
return (
<div className="flex w-full max-w-md flex-col gap-4">
<AIInsight
meta="Updated 2h ago"
headline="Strong fit — 92% ICP match"
reason="Recently raised a Series B and opened 6 SDR roles — outbound capacity is a stated priority."
/>
<AIInsight compact headline="Strong fit — 92% ICP match" reason="Recently raised a Series B and opened 6 SDR roles" />
</div>
);
}Installation
Components are copied into your project — no runtime package.
Install the following dependencies:
terminalnpm install lucide-reactCreate a
ai-insight.tsxfile and paste the following code into it.src/components/ui/ai-insight.tsximport { 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> ); }Add the theme tokens and the
cxhelper from Installation if you haven’t yet, then update the import paths to match your project setup.