Corpora UI

Context cards

Retrieved chunks: header with a count pill, then a card per chunk with title, character count, snippet and the source file pill.

Preview

Use the controls to explore the component's props.

Props

PropTypeDefaultDescription
cards (required)IContextCard[]—title, meta, snippet, file { name, type }.
header / countReactNode—Defaults to All chunks and cards.length.
onOpen(card, index) => void—File pill click.

Example

All chunks32
Vendor onboarding rule290 characters

Cold-chain certification must be verified before a new dairy can be added to the approved supplier list.

Seasonal demand row1,250 characters

Q4 velocity table: pistachio +18%, vanilla +6%, rocky road -11%; retire rocky road by March.

import { ContextCards } from "@exegia/corpora-ui"

<ContextCards
  count={32}
  cards={[
    {
      title: "Vendor onboarding rule",
      meta: "290 characters",
      snippet: "…",
      file: { name: "SOP.pdf", type: "PDF" },
    },
  ]}
/>

Last updated on

On this page