c15t
| Install | |
|---|---|
npm install c15t |
|
| Latest Version: | 3.1.0 |
| License: | Apache-2.0 |
| Last Updated: | Oct 21, 2026 |
| Links: | GitHub · npm |
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:
c15tbrings 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/backendon 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
- Node.js 20.19 or later
- An Inth project (free sign-up), a self-hosted backend, or offline mode for local development
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
- Wrap your app in
ConsentProviderwith the backend URL from your Inth project, and add the banner, the dialog, and a link that opens the dialog again - Add vendor loaders to
scriptsto 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
- Join our Discord community
- Open an issue on our GitHub repository
- Visit inth.com and use the chat widget
- Contact our support team via email support@inth.com
Contributing
- Read the contribution guidelines before you open a pull request
- Follow the code of conduct
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
Built by Inth
Related Packages
Astro cookie consent banner and GDPR consent management platform (CMP). Server-r...
Vue and Nuxt cookie consent banner, consent dialog and preference center. A GDPR...
Server-rendered cookie consent for Nuxt without a third-party script: an SSR con...
Centralized cookie consent management (CMP) for 30+ sites — a typed wrapper arou...
Cookie consent for Vue 3, Nuxt, VitePress and Quasar where the visitor's choice...
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 | |
| 2.1.0 | Apache-2.0 | |
| 2.0.4 | Apache-2.0 | |
| 2.0.0 | Apache-2.0 | |
| 1.8.6 | GPL-3.0-only | |
| 1.8.5 | GPL-3.0-only | |
| 1.8.4 | GPL-3.0-only | |
| 1.8.3 | GPL-3.0-only | |
| 1.8.2 | GPL-3.0-only | |
| 1.8.1 | GPL-3.0-only | |
| 1.8.0 | GPL-3.0-only | |
| 1.7.1 | GPL-3.0-only | |
| 1.7.0 | GPL-3.0-only | |
| 1.6.0 | GPL-3.0-only | |
| 1.5.0 | GPL-3.0-only | |
| 1.4.4 | GPL-3.0-only | |
| 1.4.2 | GPL-3.0-only | |
| 1.4.1 | GPL-3.0-only | |
| 1.4.0 | GPL-3.0-only | |
| 1.3.3 | GPL-3.0-only | |
| 1.3.1 | GPL-3.0-only | |
| 1.3.0 | GPL-3.0-only | |
| 1.2.1 | GPL-3.0-only | |
| 1.2.0 | GPL-3.0-only | |
| 1.1.4 | GPL-3.0-only | |
| 1.1.3 | GPL-3.0-only |
Showing the latest 30 of 36. See every release on npm
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 | |
| 3.0.0-alpha.9 | Apache-2.0 | |
| 3.0.0-alpha.8 | Apache-2.0 | |
| 3.0.0-alpha.7 | Apache-2.0 | |
| 3.0.0-alpha.6 | Apache-2.0 | |
| 3.0.0-alpha.5 | Apache-2.0 | |
| 3.0.0-alpha.4 | Apache-2.0 | |
| 3.0.0-alpha.3 | Apache-2.0 | |
| 3.0.0-alpha.2 | Apache-2.0 | |
| 3.0.0-alpha.1 | Apache-2.0 | |
| 3.0.0-alpha.0 | Apache-2.0 | |
| 2.3.0-canary-20260930161603 | Apache-2.0 | |
| 2.2.0-canary-20260814121231 | Apache-2.0 | |
| 2.2.0-canary-20260731105620 | Apache-2.0 | |
| 2.2.0-canary-20260727202135 | Apache-2.0 | |
| 2.0.0-rc.10 | Apache-2.0 | |
| 2.0.0-rc.8 | GPL-3.0-only | |
| 2.0.0-rc.6 | GPL-3.0-only | |
| 2.0.0-rc.5 | GPL-3.0-only | |
| 2.0.0-rc.4 | GPL-3.0-only | |
| 2.0.0-rc.3 | GPL-3.0-only | |
| 2.0.0-rc.2 | GPL-3.0-only | |
| 2.0.0-rc.1 | GPL-3.0-only | |
| 2.0.0-rc.0 | GPL-3.0-only | |
| 1.8.3-canary-20260109181827 | GPL-3.0-only | |
| 1.8.3-canary-20251222100111 | GPL-3.0-only |
Showing the latest 30 of 94. See every release on npm