@provenancekit/uiis a theme-aware React component library. Add a<ProvenanceBadge>to any piece of AI-generated content and users can instantly inspect its full provenance chain.
Installation
Setup
1. Add the stylesheet
Import the design tokens in your global CSS file:2. Wrap your app with the provider
Provider props
| Prop | Type | Description |
|---|---|---|
pk | ProvenanceKit | Pre-built SDK instance (takes priority over apiUrl/apiKey) |
apiUrl | string | API base URL |
apiKey | string | API key |
theme | ProvenanceKitTheme | CSS custom property overrides |
CSS Design Tokens
Every component reads its colors from CSS custom properties. Override them globally or per-scope:theme prop on ProvenanceKitProvider:
Headless Mode
Every data-fetching component supports passing data directly — no network requests needed. This is useful for SSR, Storybook, and testing:Next.js App Router pattern
Components are marked"use client" internally. In Next.js, re-export from a client boundary so Server Components can import them:
components/ui/pk-ui in any Server Component.