Skip to content
Notra logoNotra UI
Esc
↑↓navigate↵open⌘Jpreview
On this page

Highlight

A mark that sweeps in Google's blue highlight.

import { AIOverview } from "../components/ai-overview";
import { AIOverviewCitation } from "../components/ai-overview-citation";
import { AIOverviewParagraph } from "../components/ai-overview-content";
import { AIOverviewHighlight } from "../components/ai-overview-highlight";
import { VERCEL, VERCEL_DOCS } from "../constants/vercel-sources";

export default function AIOverviewHighlightExample() {
  return (
    <AIOverview className="p-6" collapsible={false}>
      <AIOverviewParagraph>
        <AIOverviewHighlight active>
          Vercel is a cloud platform for building and hosting web apps
        </AIOverviewHighlight>
        . Hover the chip to highlight the next claim:{" "}
        <AIOverviewHighlight>
          every pull request gets its own preview URL.
        </AIOverviewHighlight>
        <AIOverviewCitation sources={[VERCEL, VERCEL_DOCS]} />
      </AIOverviewParagraph>
    </AIOverview>
  );
}
$ bunx --bun shadcn@latest add @notra/ai-overview-highlight

AIOverviewHighlight is a plain mark. With active it sweeps the highlight in on mount and sets the text in medium weight. Without it the highlight shows only while the AIOverviewCitation right after it is hovered or focused. Both are pure CSS.

Used in

Google AI Overview

A full recreation of Google’s AI Overview with highlights, citation chips and a collapsible Show more.