Citation Chip
An inline source number for answer text. Hover it and a glass card springs out with the site, the passage, and how much the answer leans on it.
Needs: Sources from your own retrieval step. No model in the browser, no network: the site mark is a letter, not a fetched favicon.
Customize
openOn
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| n | number | required | The number on the chip. |
| source | { title: string; url: string; domain?: string; snippet: string; quote?: string; support?: "strong" | "partial" | "weak" } | required | The source. `domain` defaults to the URL's host. `quote` is highlighted inside `snippet` when found. `support` is said as "The main source", "Mentioned" or "Weak support". |
| accent | string | "" | Chip and highlight colour. |
| openOn | "hover" | "click" | "hover" | Hover opens on hover or keyboard focus and still opens on tap. Click waits for a click. |
| className | string | – | Added to the root span. |
| style | CSSProperties | – | Inline styles for the root span, e.g. ml-ui colour variables. |