ChatSources
Numbered citations that open a hover card (with a carousel when one marker cites several sources) and the list of sources under a reply.
Installation
Import from @gaudi/design-system. Load @gaudi/design-system/global.css once and add transpilePackages: ['@gaudi/design-system'] in Next.js.
Copy an example into your project with the shadcn CLI: npx shadcn@latest add https://design.gaudi.site/r/chat-sources-research-citations.json.
Usage
Examples
Research with citations
API
8 props
Accessibility
Citations are buttons named “Source n: title”. The card opens on hover without taking focus, and on click, tap, Enter or Space with focus inside; arrow keys and buttons page the carousel and the position is announced.
Notes
- See Cited answer on this page for grouped citations [1, 3] beside a SchemaDisplay tool result.
Related
SchemaDisplayRead an API endpoint or a JSON Schema: method badge, path with highlighted parameters, and request and response schemas as an expandable property tree.ChatMessageOne turn in a conversation: avatar, sender and time, the content stack and a status footer.4 examplesChatBubbleThe surface around a message, with seven variants and reactions.4 examplesAvatarProfile images, resilient initials, presence, verification, account menus and collaborator groups. The existing Avatar API and curated patterns share the same image and fallback primitives.10 examplesChatAgentMarkThe assistant’s mark: a Gaudí-inspired motif glazed in a tile hue picked from a seed, or an icon, image or monogram on a token tile, with an optional activity badge.ChatFeedbackCopy, rate and regenerate a finished reply.