Displays website sources used by AI-generated content, showing URL details, titles, and descriptions on hover.
Installation
Install shadcn-svelte components
Install the required shadcn-svelte components for this component:
Copy the Source Code
Copy and paste the following code into your project:
Examples
Props
Source
| Prop | Type | Default | Description |
|---|---|---|---|
href | string | - | Source URL shared with nested source trigger/content components. |
children | Snippet | - | Trigger and content rendered inside the hover card. |
SourceTrigger
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | number | - | Label shown in the source chip. Falls back to the domain. |
showFavicon | boolean | false | Shows the favicon beside the label. |
class | string | - | Additional CSS classes for the trigger anchor. |
SourceContent
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | - | Source title shown in the hover card. |
description | string | - | Source description shown in the hover card. |
class | string | - | Additional CSS classes for the hover card content. |