Quickstart
February 10, 2026
Via CLI
Manual Installation
Install package
Import styles
Import the prebuilt component stylesheet in your app-level CSS entrypoint. This is required for styled components to render correctly.
Keeping the c15t stylesheet in your global CSS entrypoint makes layer and cascade order explicit. JS/TSX side-effect imports can load in a different order across framework and Tailwind tooling, which makes style regressions harder to debug.
Info
If you are using the headless API or fully custom styling, you can skip this import. src/main.tsx should keep importing ./index.css as usual.
Create ConsentManager components
Create a provider component with the consent UI and a wrapper that re-exports it. This initializes the consent store and makes consent state available to all child components.
Info
Hosted mode is the recommended production setup because the backend resolves jurisdiction and policy, keeps durable consent records, and lets c15t recover from temporary network failures by re-syncing later.
Info
Don't have a backend yet? You can use mode: 'offline' for local-only consent storage, but it gives up backend audit history, server-side consent awareness, and automatic jurisdiction detection. Review the browser-only storage consequences before choosing it for production.
Mount ConsentManager at the app root
Wrap your existing app tree with ConsentManager so all routes/components can access consent state.
Verify it works
Start your development server and confirm:
- A consent banner appears at the bottom of the page
- Clicking "Customize" opens a dialog with toggles for each consent category
- After accepting or rejecting, the banner dismisses and your choice persists across page reloads
Info
Want to improve startup performance? See Optimization for the decision guide, prefetch setup, and network tuning.
Optional: Add DevTools
Install DevTools only if you want a runtime inspector while building and debugging:
Then add it inside your existing provider:
Info
Want to understand what's happening under the hood? See Initialization Flow for the lifecycle and Cookie Management for script/cookie behavior and revocation handling.
Optional: AI Agents
Install c15t agent skills to let AI agents help with styling, i18n, scripts & other configuration.
See AI Agents for bundled package docs and agent skills.