[openpolicy]@openpolicy/react@0.0.30

Your privacy policy, as a typed config.

Define your policy once in TypeScript. Render it as React components, generate Markdown, ship a consent banner — all driven from the same source of truth.

privacy.tsx
import { OpenPolicy, PrivacyPolicy } from "@openpolicy/react";
import openpolicy from "@/openpolicy";

export function PrivacyPolicyPage() {
  return (
    <OpenPolicy config={openpolicy}>
      <PrivacyPolicy />
    </OpenPolicy>
  );
}
[01]what you get

A policy you can grep, diff, and review.

[01]
Typed config
definePolicy() gives you autocomplete and type errors when something is missing or stale.
[02]
React renderer
Drop-in components for the policy page, individual sections, and per-purpose data tables.
[03]
Markdown export
Generate a static .md version for your repo, your docs site, or for the agents to consume.
[04]
Consent banner
A shadcn-style banner that reads from the same config — no copy drift between policy and UI.
[05]
Astro + Svelte
Astro docs are first-class. A Svelte adapter is shipping. More frameworks on the roadmap.
[06]
Documents, not advice
Built with privacy counsel review in mind — never as a replacement for it.
[02]install

Two lines and you’re shipping.

bash
pnpm dlx @openpolicy/cli init
openpolicy.ts
import { defineConfig } from "@openpolicy/sdk";

export default defineConfig({
  company: { name: "Acme, Inc." },
  jurisdictions: ["eu", "us-ca"],
  data: {
    collected: {
      "Account Information": ["Name", "Email"],
    },
  },
});