AI Chat Fancy Stable

Sources

The citations under an answer: a pill carrying a stack of domain monograms and a count, expanding into scannable source cards with title, host, and the line worth reading

Preview

Installation

pnpm add fancy-ui-svelte
import { Sources } from 'fancy-ui-svelte'

Usage

svelte
<script lang="ts">
  import { Sources } from 'fancy-ui-svelte';
</script>

<Sources />

Examples

Basic Usage

Props

PropTypeDefaultDescription
sources *SourceData[]-The documents backing the answer, in reading order
open booleanfalseWhether the list is expanded; bindable
onToggle (open: boolean) => void-Called when the pill is clicked, with the state it moved to; driving open yourself does not fire it

Slots

SlotDescription
childrenReplaces the default trigger-and-list composition entirely; omit it and the root renders both
itemOn SourcesList — replaces the default card; receives the source and its index
iconOn SourceCard — replaces the monogram: a favicon you host, a logo