Context Cards

Retrieved knowledge chunks with their sources.

Installation

bun add elia
@import "tailwindcss";
@import "@aile.sh/elia/styles/elia.css";
@source "../node_modules/@aile.sh/elia";

Usage

import { ContextCards } from "@aile.sh/elia";

export function Example() {
  return (
    <ContextCards
      totalCount={12}
      chunks={[
        {
          title: "Refund policy",
          chars: "412 characters",
          body: "Refunds are issued to the original payment method within 5 business days of approval.",
          source: "Support Handbook.pdf",
          badge: "PDF",
          tone: "bg-red",
        },
        {
          title: "Escalation matrix",
          chars: "980 characters",
          body: "Tier-2 tickets unanswered for 4 hours escalate to the on-call engineer automatically.",
          source: "Ops Runbook.md",
          badge: "MD",
        },
      ]}
      onSourceClick={(chunk) => window.open(`/docs/${chunk.source}`)}
    />
  );
}

— elia design system · MIT · primitives · https://github.com/aile-sh/elia