c15t

The open standard for cookie banners. Open-source cookie consent management platform (CMP) for React, Next.js, Vue and more, with GDPR, Google Consent Mode v2 and IAB TCF support.
3,309,204 1,991
Install
npm install c15t
Latest Version:3.1.0
License:Apache-2.0
Last Updated:Oct 21, 2026
Links: GitHub  ·  npm
Maintainer: burnedchris

c15t: The Open Standard for Cookie Banners

c15t is the open standard for cookie banners. It's an open-source cookie consent manager and consent management platform (CMP). One package gives you a GDPR cookie banner, a preference dialog, and consent-gated scripts for React, Next.js, Vue, Nuxt, Astro, TanStack Start, and plain JavaScript. Keep consent records on Inth, on a backend you run, or in the browser only.

c15t is used by 2,100+ sites, including expo.dev, zed.dev, unkey.dev, mintlify.com, and sazabi.com.

Key Features

  • One install for every framework: c15t brings the consent engine and the React, Next.js, Vue, Nuxt, Astro, and TanStack Start adapters, always at the same version
  • Analytics, ads, pixels, and embeds follow each visitor's choice. Ready-made loaders cover 40+ vendors, such as Google Tag Manager, GA4, Meta Pixel, and PostHog
  • Policies decide who sees a banner: opt-in for visitors in the EU, opt-out for some US states, or rules that you write
  • On server-rendered Next.js, Nuxt, Astro, and TanStack Start pages, the server resolves each visitor's policy and can send the banner in the first HTML
  • Google Consent Mode v2, IAB TCF 2.4, and Global Privacy Control support
  • Prebuilt components with a theme system, or headless hooks and composables for your own design
  • Framework peer dependencies are optional, so a plain JavaScript project does not install React, Vue, or Astro

Supported Frameworks

Framework Import from Quickstart
JavaScript, headless c15t, c15t/runtime Headless runtime
React 18 and 19 (Vite, React Router) c15t/react React
Next.js 15 and 16 (App Router, Pages Router) c15t/next Next.js
Vue 3 c15t/vue/vue-plugin Vue
Nuxt 3 and 4 c15t/vue (Nuxt module) Nuxt
Astro 5, 6, and 7 c15t/astro Astro
TanStack Start c15t/tanstack-start TanStack Start
Svelte 5 and SvelteKit @c15t/svelte, a separate install Svelte, SvelteKit
Script tag, no build step (Webflow, WordPress, Framer, Squarespace) @c15t/browser, a separate install HTML

Not sure which one fits? Choose your setup compares the options by framework, rendering mode, and hosting.

Hosting

c15t needs somewhere to keep policies and consent records. Pick one:

  • Hosted on Inth: Inth runs the backend for you. You get policy storage, consent records, audit history, and a dashboard, with no database or server to run. Sign-up is free.
  • Self-hosted: Run @c15t/backend on your own server with PostgreSQL, MySQL, or SQLite. You own migrations, backups, and uptime. See the self-hosting guide.
  • Offline: Choices stay in the browser, with no consent records. Use it for local development, previews, and demos, not production.

The frontend code is the same for Inth and a self-hosted backend. Only the backend URL changes.

Prerequisites

Installation

pnpm add c15t @c15t/integrations

@c15t/integrations has the vendor loaders, such as PostHog in the example below. Leave it out if you load no third-party scripts.

Then follow the quickstart for your framework in Supported Frameworks. Each subpath is the same code as its scoped package, so c15t/react and @c15t/react are interchangeable.

Usage

  1. Wrap your app in ConsentProvider with the backend URL from your Inth project, and add the banner, the dialog, and a link that opens the dialog again
  2. Add vendor loaders to scripts to apply category permissions and vendor consent APIs
// src/consent.tsx (React)
import { posthog } from '@c15t/integrations/posthog'
import {
  ConsentBanner,
  ConsentDialog,
  ConsentDialogLink,
  ConsentProvider,
  hosted,
} from 'c15t/react'
import type { ReactNode } from 'react'

import 'c15t/react/styles.css'

const options = {
  mode: hosted({ backendURL: 'https://your-project.inth.app' }),
  scripts: [posthog({ id: 'phc_your_project_key', loadMode: 'after-consent' })],
}

export const Consent = ({ children }: { children: ReactNode }) => (
  <ConsentProvider options={options}>
    {children}
    <ConsentBanner />
    <ConsentDialog />
    <ConsentDialogLink>Privacy settings</ConsentDialogLink>
  </ConsentProvider>
)

Documentation

See the documentation for guides, API reference, and examples.

Package Map

c15t subpath Same code as
c15t, c15t/runtime, c15t/build @c15t/core
c15t/react @c15t/react
c15t/next @c15t/nextjs
c15t/vue @c15t/vue
c15t/astro @c15t/astro
c15t/tanstack-start @c15t/tanstack-start

The scoped packages stay published and supported. Use them when you want to pin one adapter on its own.

Related Packages

  • @c15t/integrations: consent-aware loaders for Google Tag Manager, GA4, Meta Pixel, PostHog, and 40+ other vendors
  • @c15t/iab: IAB TCF 2.4 and GPP for programmatic advertising
  • @c15t/backend: the self-hosted consent backend
  • @c15t/node-sdk: read and write consent records from your server
  • @c15t/cli: set up c15t, run migrations, and install agent skills

Docs for AI Agents

This package ships its documentation as Markdown, matched to the installed version. After you install it, point your coding agent at node_modules/c15t/AGENTS.md. It indexes every guide in node_modules/c15t/docs/.

On the web, every page of the c15t docs has a Markdown version, and llms.txt lists them all. Install the c15t agent skills with npx skills add c15t/skills.

Support

Contributing

Security

Do not open a public issue for a security vulnerability. Report it privately through GitHub's vulnerability reporting. We examine every valid report.

  • Do not share the vulnerability in public forums, issues, or pull requests
  • Give the steps to reproduce it and the versions it affects
  • Give us time to release a fix before you disclose it

License

Apache License 2.0


Built by Inth

Related Packages

@c15t/astro

Astro cookie consent banner and GDPR consent management platform (CMP). Server-r...

15,689 1,999
@c15t/vue

Vue and Nuxt cookie consent banner, consent dialog and preference center. A GDPR...

15,712 1,997
@revenexx/consent-manager-nuxt

Server-rendered cookie consent for Nuxt without a third-party script: an SSR con...

520 0
@polyus-studio/vera-cmp

Centralized cookie consent management (CMP) for 30+ sites — a typed wrapper arou...

802 0
@structured-world/vue-privacy

Cookie consent for Vue 3, Nuxt, VitePress and Quasar where the visitor's choice...

13,920 3

Version History

Version Released License
3.1.0 Apache-2.0
3.0.0 Apache-2.0
2.3.0 Apache-2.0
2.2.1 Apache-2.0
2.2.0 Apache-2.0
Pre-releases (94)
Version Released License
3.1.0-canary.0 Apache-2.0
3.0.1-canary-198c836e9e869389f889eb3195a9e7b3e3902275.0 Apache-2.0
3.0.0-alpha.12 Apache-2.0
3.0.0-alpha.11 Apache-2.0
3.0.0-alpha.10 Apache-2.0