DesignX
AI Chat@paxeer/ai-chat/citation-chipimplemented

Citation chip

Citation marker using tertiary Badge.

Install

$pnpm exec designx add @paxeer/ai-chat/citation-chip

Preview

Loading preview...

Source code

components/designx/ai-chat/citation-chip.tsxtsx
import { Badge } from "@paxeer/core";

export function CitationChip({
  label = "ETH book · L2",
  href,
}: {
  label?: string;
  href?: string;
}) {
  if (href) {
    return (
      <Badge asChild variant="tertiary" data-slot="citation-chip">
        <a href={href}>{label}</a>
      </Badge>
    );
  }

  return (
    <Badge variant="tertiary" data-slot="citation-chip">
      {label}
    </Badge>
  );
}

Dependencies

Registry dependencies