Quickstart

Get started with c15t in vanilla JavaScript — framework-agnostic consent management with no UI dependencies.

Installation

Initialize the Runtime

getOrCreateConsentRuntime() creates a consent client and a Zustand vanilla store in a single call. The store holds all consent state and exposes methods for checking, setting, and subscribing to consent changes.

Subscribe to State Changes

The store is a Zustand vanilla store — use subscribe() to react to consent changes and getState() to read the current state:

Here's a bare-bones example using the store to drive a consent prompt — no framework required:

Verify It Works

Open the browser console and inspect the store state:

Info

No UI included — the c15t core package is fully headless. See Building UI for creating your own components, or use @c15t/react / @c15t/nextjs for pre-built UI.

Optional: Install Agent Skills

Install c15t agent skills to let AI agents help with styling, i18n, scripts & other configuration.

See AI Tools for details.

Next Steps