# Context Card

> Retrieved knowledge chunks with their sources.

Registry name: `context-card`. HTML docs: https://ui.anuragroy.dev/component/context-card.

## Install

```bash
npx shadcn@latest add https://ui.anuragroy.dev/r/context-card.json
```

If the website is down: `npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/context-card.json`.

Registry JSON: https://ui.anuragroy.dev/r/context-card.json (GitHub: https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/context-card.json).

## Import

Import paths follow the consumer `components.json` aliases. After a default install:

```tsx
import {
  ContextCard,
  ContextCardContent,
  ContextCardGroup,
  ContextCardHeader,
  ContextCardMeta,
  ContextCardSource
} from "@/components/ui/context-card"
```

## Usage

```tsx
import {
  ContextCard,
  ContextCardContent,
  ContextCardGroup,
  ContextCardHeader,
  ContextCardMeta,
  ContextCardSource,
} from "@/components/ui/context-card"

export function Example() {
  return (
    <ContextCardGroup>
      <ContextCard>
        <ContextCardHeader>
          <ContextCardSource>Sidebar navigation guidelines</ContextCardSource>
          <ContextCardMeta>290 characters</ContextCardMeta>
        </ContextCardHeader>
        <ContextCardContent>
          Persistent sidebars should stay collapsed-friendly.
        </ContextCardContent>
      </ContextCard>
    </ContextCardGroup>
  )
}
```

## API

### ContextCard

Single retrieved chunk. Wrap several in `ContextCardGroup`.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | string | — |  |

## See also

- [HTML page](https://ui.anuragroy.dev/component/context-card): Preview and the same docs in the site chrome.
- [Registry item](https://ui.anuragroy.dev/r/context-card.json): Source files and dependencies.
- [Catalog](https://ui.anuragroy.dev/component): All components.
- [llms.txt](https://ui.anuragroy.dev/llms.txt): Agent index for this library.
