# Source stack

Sources that pile up as they are found, and deal out into a row with their names when you point at them.

Also called: stacked sources, favicon stack.

> chatcn Pro: needs a Pro license (https://chatcn.dev/pro). Install from the `@chatcn-pro` registry with your license token; setup at https://chatcn.dev/docs/chatcn-pro.

Example: Sources that pile up. Each site found drops onto the stack and the count rolls; point at it and it fans out into an arc with every name. Preview: https://chatcn.dev/preview/source-stack-demo

Each new site drops onto the stack from above and settles over the last one, and the count rolls with it. Point at the stack, focus it or tap it, and it deals out into a row with a list of every site under it, so you can see what was read before reading the answer. Past five the stack keeps the newest and counts the rest.

## Installation

```bash
npx shadcn@latest add @chatcn-pro/source-stack
```

## Usage

```tsx
import { SourceStack } from "@/components/ui/chatcn/pro/source-stack"

<SourceStack sources={found} searching={!done} />
```

## Props

| Prop | Type | Notes |
| --- | --- | --- |
| `sources` | `{ id, title, site, icon? }[]` | In the order found |
| `searching` | `boolean` | Prefixes Searching |
| `visible` | `number` | Icons kept in the stack. Default 5 |
| `open` | `boolean` | Controlled, for tours |

## Accessibility

- The stack is a button named with the count, with `aria-expanded`; the list is plain text.

## Motion

- Drops are 420 ms, 60 ms apart; dealing out is a 300 ms transform with a 25 ms stagger. Reduced motion: no drop or deal.

Source: https://chatcn.dev/docs/components/source-stack