Citation Chip

Inline citation button for AI answers, with an accent source number and label. Link it to a source panel or popover so users can check references.

src/registry/ui/citation-chip.tsx/r/citation-chip.json

Indexed

Installation#

bash
npx shadcn@latest add @minidev/citation-chip

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/citation-chip.json

Usage#

tsx
import { CitationChip } from "@/components/ui/citation-chip"

export function Example() {
  return (
    <CitationChip className="ml-1">1</CitationChip>
  )
}

API reference#

CitationChip props
PropTypeDefault
indexnumber-

Also accepts every prop of <button>, passed through to the root element.

Examples#

All AI chat UI components for React