Supports CID lookup, file upload, or both modes simultaneously. Results are returned via the onResult callback.
- Preview
- Code
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
A dual-mode search: enter a CID to look up provenance, or upload a file to find near-duplicates by vector similarity.
Supports CID lookup, file upload, or both modes simultaneously. Results are returned via the onResult callback.
import { ProvenanceSearch } from "@provenancekit/ui";
// Full mode: CID input + file upload
<ProvenanceSearch
mode="both"
onResult={({ cid }) => router.push(`/provenance/${cid}`)}
/>
// Upload only
<ProvenanceSearch
mode="upload"
accept="image/*"
maxSize={10 * 1024 * 1024} // 10 MB
onResult={({ cid }) => console.log("Found:", cid)}
/>
// CID lookup only
<ProvenanceSearch mode="cid" onResult={({ cid }) => setActiveCid(cid)} />
| Prop | Type | Default | Description |
|---|---|---|---|
mode | "upload" | "cid" | "both" | "both" | Search input modes |
accept | string | — | MIME types for file upload (e.g. "image/*") |
maxSize | number | — | Max file size in bytes |
onResult | (result: { cid: string }) => void | — | Called when a result is selected |
className | string | — | Additional CSS classes |