# Citation

An inline reference that links a passage to its source.

- **Use it for**: An inline reference that links a passage to its source.
- **Not for**: Lists of sources. Try [Sources](https://unseenui.com/components/sources/).

## Installation

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

## Usage

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

<Citation variant="chip" source={source} number={1} />
```

## All props

| Prop | Type | Description |
| --- | --- | --- |
| `className` | `string` | Added to the citation button. |
| `number` (required) | `number` |  |
| `reference` | `CitationReference` |  |
| `source` | `Source \| Source` |  |
| `variant` | `"number" \| "inline" \| "chip"` |  |

## 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

[SourceCard](https://unseenui.com/components/source-card/), [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/citation/
