---
name: "@openpolicy"
slug: "openpolicy"
description: "PolicyStack is an open-source, AI-first toolkit for adding privacy policies and consent management to React (and Vue, Svelte, Solid, Angular) apps. The shadcn registry provides copy-paste components for terms pages, privacy policies, and cookie consent banners. A typed policystack.ts config drives policy rendering and consent gating; a Vite plugin compiles policies at build time and fails builds on undeclared cookies. Packages include @policystack/react (policy, consent, provider), a headless consent state machine (~4kb), and an optional cloud control plane for versioning and audit trails. Apache-2.0 licensed. Use for: embedding GDPR/CCPA-compliant privacy policy UI and consent banners directly into your React app without third-party iframes."
category: "Niche/single-purpose"
tags: ["ai", "overlays"]
framework: "vue"
license: "Apache-2.0"
author: "jamiedavenport"
website: "https://www.openpolicy.sh"
github: "https://github.com/jamiedavenport/policystack"
registry: "https://www.openpolicy.sh/r/{name}.json"
pro: false
pro_url: null
github_stars: 156
component_count: 0
generated_at: "2026-07-28T08:00:50.948Z"
---

# @openpolicy

PolicyStack is an open-source, AI-first toolkit for adding privacy policies and consent management to React (and Vue, Svelte, Solid, Angular) apps. The shadcn registry provides copy-paste components for terms pages, privacy policies, and cookie consent banners. A typed policystack.ts config drives policy rendering and consent gating; a Vite plugin compiles policies at build time and fails builds on undeclared cookies. Packages include @policystack/react (policy, consent, provider), a headless consent state machine (~4kb), and an optional cloud control plane for versioning and audit trails. Apache-2.0 licensed. Use for: embedding GDPR/CCPA-compliant privacy policy UI and consent banners directly into your React app without third-party iframes.

## Links

- Website: https://www.openpolicy.sh
- GitHub: https://github.com/jamiedavenport/policystack
- Registry JSON: https://www.openpolicy.sh/r/{name}.json
- Directory page: https://sh4dcn.vercel.app/registry/openpolicy
- This file: https://sh4dcn.vercel.app/md/openpolicy.md

## Install

```sh
# clone the source repo
git clone https://github.com/jamiedavenport/policystack.git
# fetch the raw registry index
curl -s https://www.openpolicy.sh/r/{name}.json
```

## Components (0)

_No public registry index resolved for this library._

## For AI agents

```text
You are adding components from @openpolicy to a shadcn-compatible project.
1. Read this file (https://sh4dcn.vercel.app/md/openpolicy.md) for the component list.
2. Fetch the machine-readable index: https://www.openpolicy.sh/r/{name}.json
3. Install a single component with its install command from the table above.
4. Full structured record: https://sh4dcn.vercel.app/json (library slug: openpolicy).
```
