# SourceCard

A source behind an answer, with its access state and excerpt.

- **Use it for**: One source with its access state and excerpt.
- **Not for**: A count of sources. Try [Sources](https://unseenui.com/components/sources/).

## Installation

```bash
npm install @stackunseen/ui
```

## Usage

```tsx
import { SourceCard } from '@stackunseen/ui';
import '@stackunseen/ui/styles.css';

<SourceCard variant="card" source={source} onOpen={openSource} />
```

## All props

| Prop | Type | Description |
| --- | --- | --- |
| `className` | `string` |  |
| `onOpen` | `((source: Source) => void)` |  |
| `source` (required) | `Source` |  |
| `variant` | `"compact" \| "card" \| "row"` |  |

## Keyboard

Tab reaches controls; Enter or Space activates buttons. Accordions use arrow keys, Home and End. Select menus support arrows and typeahead; Escape closes menus and dialogs and restores focus.

## Works with

[Citation](https://unseenui.com/components/citation/), [EvidenceGroup](https://unseenui.com/components/evidence-group/), [GroundingStatus](https://unseenui.com/components/grounding-status/), [Sources](https://unseenui.com/components/sources/), [ProvenanceBadge](https://unseenui.com/components/provenance-badge/), [ConfidenceNote](https://unseenui.com/components/confidence-note/)

Page: https://unseenui.com/components/source-card/
