@c15t/react 2.0.4 → 2.2.0-canary-20260727202135

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/AGENTS.md +155 -0
  2. package/README.md +29 -14
  3. package/client/components/integrations.js +3 -0
  4. package/dist/components/consent-banner/atoms/overlay.cjs +1 -1
  5. package/dist/components/consent-banner/atoms/root.cjs +1 -1
  6. package/dist/components/consent-banner/components.cjs +1 -1
  7. package/dist/components/consent-banner/consent-banner.cjs +1 -1
  8. package/dist/components/consent-banner/error-boundary.cjs +1 -1
  9. package/dist/components/consent-banner/index.cjs +1 -1
  10. package/dist/components/consent-banner/policy-actions.cjs +1 -1
  11. package/dist/components/consent-dialog/atoms/card.cjs +1 -1
  12. package/dist/components/consent-dialog/atoms/overlay.cjs +1 -1
  13. package/dist/components/consent-dialog/atoms/root.cjs +1 -1
  14. package/dist/components/consent-dialog/consent-dialog.cjs +1 -1
  15. package/dist/components/consent-dialog/index.cjs +1 -1
  16. package/dist/components/consent-dialog-link/index.cjs +1 -1
  17. package/dist/components/consent-dialog-trigger/atoms/button.cjs +1 -1
  18. package/dist/components/consent-dialog-trigger/atoms/button.js +1 -1
  19. package/dist/components/consent-dialog-trigger/atoms/icon.cjs +1 -1
  20. package/dist/components/consent-dialog-trigger/atoms/root.cjs +1 -1
  21. package/dist/components/consent-dialog-trigger/atoms/text.cjs +1 -1
  22. package/dist/components/consent-dialog-trigger/atoms/toolbar.cjs +1 -0
  23. package/dist/components/consent-dialog-trigger/atoms/toolbar.js +1 -0
  24. package/dist/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.cjs +1 -0
  25. package/dist/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.js +1 -0
  26. package/dist/components/consent-dialog-trigger/consent-dialog-trigger.cjs +1 -1
  27. package/dist/components/consent-dialog-trigger/index.cjs +1 -1
  28. package/dist/components/consent-dialog-trigger/index.js +1 -1
  29. package/dist/components/consent-dialog-trigger/use-draggable.cjs +1 -1
  30. package/dist/components/consent-preferences-link/consent-preferences-link.cjs +1 -1
  31. package/dist/components/consent-preferences-link/index.cjs +1 -1
  32. package/dist/components/consent-widget/atoms/accordion.cjs +1 -1
  33. package/dist/components/consent-widget/atoms/button.cjs +1 -1
  34. package/dist/components/consent-widget/atoms/footer.cjs +1 -1
  35. package/dist/components/consent-widget/atoms/root.cjs +1 -1
  36. package/dist/components/consent-widget/consent-widget.cjs +1 -1
  37. package/dist/components/consent-widget/index.cjs +1 -1
  38. package/dist/components/consent-widget/policy-actions.cjs +1 -1
  39. package/dist/components/frame/atoms.cjs +1 -1
  40. package/dist/components/frame/atoms.js +1 -1
  41. package/dist/components/frame/frame.cjs +1 -1
  42. package/dist/components/frame/index.cjs +1 -1
  43. package/dist/components/iab-consent-banner/atoms/button-group.cjs +1 -1
  44. package/dist/components/iab-consent-banner/atoms/card.cjs +1 -1
  45. package/dist/components/iab-consent-banner/atoms/description.cjs +1 -1
  46. package/dist/components/iab-consent-banner/atoms/footer.cjs +1 -1
  47. package/dist/components/iab-consent-banner/atoms/header.cjs +1 -1
  48. package/dist/components/iab-consent-banner/atoms/overlay.cjs +1 -1
  49. package/dist/components/iab-consent-banner/atoms/root.cjs +1 -1
  50. package/dist/components/iab-consent-banner/atoms/title.cjs +1 -1
  51. package/dist/components/iab-consent-banner/iab-consent-banner.cjs +1 -1
  52. package/dist/components/iab-consent-banner/iab-consent-banner.js +1 -1
  53. package/dist/components/iab-consent-banner/index.cjs +1 -1
  54. package/dist/components/iab-consent-dialog/atoms/card.cjs +1 -1
  55. package/dist/components/iab-consent-dialog/atoms/content.cjs +1 -1
  56. package/dist/components/iab-consent-dialog/atoms/footer.cjs +1 -1
  57. package/dist/components/iab-consent-dialog/atoms/header.cjs +1 -1
  58. package/dist/components/iab-consent-dialog/atoms/overlay.cjs +1 -1
  59. package/dist/components/iab-consent-dialog/atoms/purpose-item.cjs +1 -1
  60. package/dist/components/iab-consent-dialog/atoms/root.cjs +1 -1
  61. package/dist/components/iab-consent-dialog/atoms/stack-item.cjs +1 -1
  62. package/dist/components/iab-consent-dialog/atoms/tabs.cjs +1 -1
  63. package/dist/components/iab-consent-dialog/atoms/vendor-list.cjs +1 -1
  64. package/dist/components/iab-consent-dialog/hooks/use-gvl-data.cjs +1 -1
  65. package/dist/components/iab-consent-dialog/iab-consent-dialog.cjs +1 -1
  66. package/dist/components/iab-consent-dialog/index.cjs +1 -1
  67. package/dist/components/iab-consent-dialog/use-iab-translations.cjs +1 -1
  68. package/dist/components/integrations/google-map.cjs +1 -0
  69. package/dist/components/integrations/google-map.js +1 -0
  70. package/dist/components/integrations/index.cjs +1 -0
  71. package/dist/components/integrations/index.js +1 -0
  72. package/dist/components/integrations/shared.cjs +1 -0
  73. package/dist/components/integrations/shared.js +1 -0
  74. package/dist/components/integrations/youtube-embed.cjs +1 -0
  75. package/dist/components/integrations/youtube-embed.js +1 -0
  76. package/dist/components/shared/libs/recursive-clone-children.cjs +1 -1
  77. package/dist/components/shared/libs/slot.cjs +1 -1
  78. package/dist/components/shared/libs/use-controllable-state.cjs +1 -1
  79. package/dist/components/shared/policy-actions.cjs +1 -1
  80. package/dist/components/shared/primitives/box.cjs +1 -1
  81. package/dist/components/shared/primitives/button.cjs +1 -1
  82. package/dist/components/shared/primitives/button.js +1 -1
  83. package/dist/components/shared/primitives/legal-links/index.cjs +1 -1
  84. package/dist/components/shared/primitives/legal-links/index.js +1 -1
  85. package/dist/components/shared/ui/accordion/accordion.cjs +1 -1
  86. package/dist/components/shared/ui/accordion/index.cjs +1 -1
  87. package/dist/components/shared/ui/animated-collapse/animated-collapse.cjs +1 -1
  88. package/dist/components/shared/ui/animated-collapse/index.cjs +1 -1
  89. package/dist/components/shared/ui/branding.cjs +1 -1
  90. package/dist/components/shared/ui/button/button.cjs +1 -1
  91. package/dist/components/shared/ui/button/index.cjs +1 -1
  92. package/dist/components/shared/ui/collapsible/collapsible.cjs +1 -1
  93. package/dist/components/shared/ui/collapsible/index.cjs +1 -1
  94. package/dist/components/shared/ui/dialog/dialog.cjs +1 -1
  95. package/dist/components/shared/ui/dialog/index.cjs +1 -1
  96. package/dist/components/shared/ui/icon.cjs +1 -1
  97. package/dist/components/shared/ui/logo.cjs +1 -1
  98. package/dist/components/shared/ui/preference-item/index.cjs +1 -1
  99. package/dist/components/shared/ui/preference-item/preference-item.cjs +1 -1
  100. package/dist/components/shared/ui/switch/index.cjs +1 -1
  101. package/dist/components/shared/ui/switch/switch.cjs +1 -1
  102. package/dist/components/shared/ui/tabs/index.cjs +1 -1
  103. package/dist/components/shared/ui/tabs/tabs.cjs +1 -1
  104. package/dist/context/consent-manager-context.cjs +1 -1
  105. package/dist/context/consent-tracking-context.cjs +1 -1
  106. package/dist/context/theme-context.cjs +1 -1
  107. package/dist/headless.cjs +1 -1
  108. package/dist/headless.js +1 -1
  109. package/dist/hooks/index.cjs +1 -1
  110. package/dist/hooks/index.js +1 -1
  111. package/dist/hooks/use-color-scheme.cjs +1 -1
  112. package/dist/hooks/use-component-config.cjs +1 -1
  113. package/dist/hooks/use-consent-dialog-trigger.cjs +1 -1
  114. package/dist/hooks/use-consent-manager.cjs +1 -1
  115. package/dist/hooks/use-consent-script.cjs +1 -0
  116. package/dist/hooks/use-consent-script.js +1 -0
  117. package/dist/hooks/use-focus-trap.cjs +1 -1
  118. package/dist/hooks/use-headless-consent-ui.cjs +1 -1
  119. package/dist/hooks/use-headless-iab-consent-ui.cjs +1 -1
  120. package/dist/hooks/use-reduced-motion.cjs +1 -1
  121. package/dist/hooks/use-scroll-lock.cjs +1 -1
  122. package/dist/hooks/use-ssr-status.cjs +1 -1
  123. package/dist/hooks/use-styles.cjs +1 -1
  124. package/dist/hooks/use-text-direction.cjs +1 -1
  125. package/dist/hooks/use-theme.cjs +1 -1
  126. package/dist/hooks/use-translations.cjs +1 -1
  127. package/dist/iab.cjs +1 -1
  128. package/dist/index.cjs +1 -1
  129. package/dist/index.js +1 -1
  130. package/dist/primitives/accordion.cjs +1 -1
  131. package/dist/primitives/button.cjs +1 -1
  132. package/dist/primitives/collapsible.cjs +1 -1
  133. package/dist/primitives/dialog.cjs +1 -1
  134. package/dist/primitives/preference-item.cjs +1 -1
  135. package/dist/primitives/switch.cjs +1 -1
  136. package/dist/primitives/tabs.cjs +1 -1
  137. package/dist/primitives.cjs +1 -1
  138. package/dist/providers/consent-manager-provider.cjs +1 -1
  139. package/dist/server/fetch-ssr-data.cjs +1 -1
  140. package/dist/server/fetch-ssr-data.js +1 -1
  141. package/dist/server/headers.cjs +1 -1
  142. package/dist/server/headers.js +1 -1
  143. package/dist/server/index.cjs +1 -1
  144. package/dist/server/init-cache-key.cjs +1 -1
  145. package/dist/server/normalize-url.cjs +1 -1
  146. package/dist/styles.tw3.css +1 -1
  147. package/dist/types/theme/index.cjs +1 -1
  148. package/dist/types/theme/style-types.cjs +1 -1
  149. package/dist/utils/cn.cjs +1 -1
  150. package/dist/utils/merge-styles.cjs +1 -1
  151. package/dist/utils/test-helpers.cjs +1 -1
  152. package/dist/utils/theme-utils.cjs +1 -1
  153. package/dist/version.cjs +1 -1
  154. package/dist/version.js +1 -1
  155. package/dist-types/components/consent-banner/components.d.ts +2 -2
  156. package/dist-types/components/consent-banner/policy-actions.d.ts +1 -1
  157. package/dist-types/components/consent-dialog/atoms/card.d.ts +5 -5
  158. package/dist-types/components/consent-dialog-trigger/atoms/toolbar.d.ts +22 -0
  159. package/dist-types/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.d.ts +35 -0
  160. package/dist-types/components/consent-dialog-trigger/index.d.ts +2 -1
  161. package/dist-types/components/consent-dialog-trigger/types.d.ts +111 -6
  162. package/dist-types/components/consent-widget/atoms/accordion.d.ts +4 -4
  163. package/dist-types/components/consent-widget/consent-widget.d.ts +1 -1
  164. package/dist-types/components/consent-widget/policy-actions.d.ts +1 -1
  165. package/dist-types/components/integrations/google-map.d.ts +82 -0
  166. package/dist-types/components/integrations/index.d.ts +2 -0
  167. package/dist-types/components/integrations/shared.d.ts +12 -0
  168. package/dist-types/components/integrations/youtube-embed.d.ts +95 -0
  169. package/dist-types/components/shared/policy-actions.d.ts +1 -1
  170. package/dist-types/components/shared/primitives/button.d.ts +36 -2
  171. package/dist-types/components/shared/primitives/legal-links/index.d.ts +1 -1
  172. package/dist-types/components/shared/ui/accordion/accordion.d.ts +2 -2
  173. package/dist-types/components/shared/ui/branding.d.ts +3 -3
  174. package/dist-types/components/shared/ui/button/button.d.ts +1 -1
  175. package/dist-types/components/shared/ui/dialog/dialog.d.ts +1 -1
  176. package/dist-types/components/shared/ui/logo.d.ts +8 -8
  177. package/dist-types/headless.d.ts +1 -0
  178. package/dist-types/hooks/index.d.ts +1 -0
  179. package/dist-types/hooks/use-consent-script.d.ts +80 -0
  180. package/dist-types/index.d.ts +3 -1
  181. package/dist-types/providers/consent-manager-provider.d.ts +1 -1
  182. package/dist-types/server/headers.d.ts +1 -1
  183. package/dist-types/utils/theme-utils.d.ts +1 -1
  184. package/dist-types/version.d.ts +1 -1
  185. package/docs/README.md +155 -76
  186. package/docs/{building-headless-components.md → frameworks/react/building-headless-components.md} +3 -1
  187. package/docs/{callbacks.md → frameworks/react/callbacks.md} +3 -1
  188. package/docs/{components → frameworks/react/components}/consent-banner.md +10 -21
  189. package/docs/{components → frameworks/react/components}/consent-dialog-link.md +8 -5
  190. package/docs/frameworks/react/components/consent-dialog-trigger.md +202 -0
  191. package/docs/{components → frameworks/react/components}/consent-dialog.md +7 -15
  192. package/docs/frameworks/react/components/consent-manager-provider.md +228 -0
  193. package/docs/{components → frameworks/react/components}/consent-widget.md +8 -6
  194. package/docs/{components → frameworks/react/components}/dev-tools.md +9 -6
  195. package/docs/{components → frameworks/react/components}/frame.md +8 -9
  196. package/docs/{concepts → frameworks/react/concepts}/client-modes.md +4 -2
  197. package/docs/{concepts → frameworks/react/concepts}/consent-categories.md +1 -0
  198. package/docs/{concepts → frameworks/react/concepts}/consent-models.md +1 -0
  199. package/docs/{concepts → frameworks/react/concepts}/cookie-management.md +3 -3
  200. package/docs/{concepts → frameworks/react/concepts}/glossary.md +1 -0
  201. package/docs/{concepts → frameworks/react/concepts}/initialization-flow.md +1 -0
  202. package/docs/{concepts → frameworks/react/concepts}/policy-packs.md +1 -0
  203. package/docs/{headless.md → frameworks/react/headless.md} +3 -1
  204. package/docs/{hooks → frameworks/react/hooks}/use-color-scheme.md +1 -0
  205. package/docs/{hooks → frameworks/react/hooks}/use-consent-manager/checking-consent.md +3 -1
  206. package/docs/{hooks → frameworks/react/hooks}/use-consent-manager/location-info.md +3 -1
  207. package/docs/frameworks/react/hooks/use-consent-manager/overview.md +172 -0
  208. package/docs/{hooks → frameworks/react/hooks}/use-consent-manager/setting-consent.md +3 -1
  209. package/docs/{hooks → frameworks/react/hooks}/use-draggable.md +3 -1
  210. package/docs/{hooks → frameworks/react/hooks}/use-focus-trap.md +1 -0
  211. package/docs/{hooks → frameworks/react/hooks}/use-reduced-motion.md +3 -1
  212. package/docs/{hooks → frameworks/react/hooks}/use-ssr-status.md +6 -5
  213. package/docs/{hooks → frameworks/react/hooks}/use-text-direction.md +1 -0
  214. package/docs/frameworks/react/hooks/use-translations.md +55 -0
  215. package/docs/{iab → frameworks/react/iab}/consent-banner.md +9 -12
  216. package/docs/{iab → frameworks/react/iab}/consent-dialog.md +9 -14
  217. package/docs/{iab → frameworks/react/iab}/overview.md +4 -2
  218. package/docs/{iab → frameworks/react/iab}/use-gvl-data.md +3 -2
  219. package/docs/{iframe-blocking.md → frameworks/react/iframe-blocking.md} +8 -9
  220. package/docs/{internationalization.md → frameworks/react/internationalization.md} +13 -3
  221. package/docs/{network-blocker.md → frameworks/react/network-blocker.md} +13 -51
  222. package/docs/{optimization.md → frameworks/react/optimization.md} +3 -2
  223. package/docs/{policy-packs.md → frameworks/react/policy-packs.md} +3 -1
  224. package/docs/{quickstart.md → frameworks/react/quickstart.md} +26 -42
  225. package/docs/frameworks/react/script-loader.md +553 -0
  226. package/docs/{server-side.md → frameworks/react/server-side.md} +9 -4
  227. package/docs/{styling → frameworks/react/styling}/classnames.md +3 -1
  228. package/docs/{styling → frameworks/react/styling}/color-scheme.md +3 -1
  229. package/docs/frameworks/react/styling/css-variables.md +53 -0
  230. package/docs/frameworks/react/styling/overview.md +302 -0
  231. package/docs/frameworks/react/styling/slots.md +94 -0
  232. package/docs/{styling → frameworks/react/styling}/tailwind.md +3 -1
  233. package/docs/frameworks/react/styling/tokens.md +156 -0
  234. package/docs/{troubleshooting.md → frameworks/react/troubleshooting.md} +3 -1
  235. package/docs/integrations/adobe-analytics.md +160 -0
  236. package/docs/integrations/ahrefs-analytics.md +157 -0
  237. package/docs/integrations/amplitude.md +230 -0
  238. package/docs/integrations/building-integrations.md +15 -181
  239. package/docs/integrations/clearbit.md +130 -0
  240. package/docs/integrations/cloudflare-web-analytics.md +126 -0
  241. package/docs/integrations/crisp.md +140 -0
  242. package/docs/integrations/databuddy.md +152 -150
  243. package/docs/integrations/fathom-analytics.md +150 -0
  244. package/docs/integrations/google-maps.md +263 -0
  245. package/docs/integrations/google-tag-manager.md +102 -101
  246. package/docs/integrations/google-tag.md +104 -92
  247. package/docs/integrations/heap.md +219 -0
  248. package/docs/integrations/hightouch.md +199 -0
  249. package/docs/integrations/hotjar.md +143 -0
  250. package/docs/integrations/intercom.md +144 -0
  251. package/docs/integrations/linkedin-insights.md +142 -90
  252. package/docs/integrations/logrocket.md +175 -0
  253. package/docs/integrations/matomo-analytics.md +171 -0
  254. package/docs/integrations/meta-pixel.md +379 -309
  255. package/docs/integrations/microsoft-clarity.md +173 -0
  256. package/docs/integrations/microsoft-uet.md +135 -91
  257. package/docs/integrations/mixpanel-analytics.md +130 -0
  258. package/docs/integrations/overview.md +119 -75
  259. package/docs/integrations/pirsch.md +142 -0
  260. package/docs/integrations/plausible-analytics.md +154 -0
  261. package/docs/integrations/posthog.md +186 -127
  262. package/docs/integrations/promptwatch.md +121 -0
  263. package/docs/integrations/reddit-pixel.md +241 -0
  264. package/docs/integrations/rudderstack.md +271 -0
  265. package/docs/integrations/rybbit-analytics.md +143 -0
  266. package/docs/integrations/segment.md +146 -0
  267. package/docs/integrations/snapchat-pixel.md +163 -0
  268. package/docs/integrations/tiktok-pixel.md +101 -91
  269. package/docs/integrations/umami-analytics.md +148 -0
  270. package/docs/integrations/vercel-analytics.md +141 -0
  271. package/docs/integrations/x-pixel.md +123 -109
  272. package/docs/integrations/youtube.md +193 -0
  273. package/docs/shared/concepts/client-modes.md +103 -0
  274. package/docs/shared/concepts/consent-categories.md +41 -0
  275. package/docs/shared/concepts/consent-models.md +72 -0
  276. package/docs/shared/concepts/cookie-management.md +88 -0
  277. package/docs/shared/concepts/glossary.md +24 -0
  278. package/docs/shared/concepts/initialization-flow.md +105 -0
  279. package/docs/shared/concepts/policy-packs.md +225 -0
  280. package/docs/shared/react/components/consent-banner.md +242 -0
  281. package/docs/shared/react/components/consent-dialog-link.md +45 -0
  282. package/docs/shared/react/components/consent-dialog-trigger.md +185 -0
  283. package/docs/shared/react/components/consent-dialog.md +119 -0
  284. package/docs/shared/react/components/consent-manager-provider.md +183 -0
  285. package/docs/shared/react/components/consent-widget.md +121 -0
  286. package/docs/shared/react/components/dev-tools.md +81 -0
  287. package/docs/shared/react/components/frame.md +52 -0
  288. package/docs/shared/react/guides/building-headless-components.md +110 -0
  289. package/docs/shared/react/guides/callbacks.md +89 -0
  290. package/docs/shared/react/guides/headless.md +31 -0
  291. package/docs/shared/react/guides/iframe-blocking.md +65 -0
  292. package/docs/shared/react/guides/internationalization.md +123 -0
  293. package/docs/shared/react/guides/network-blocker.md +72 -0
  294. package/docs/shared/react/guides/optimization.md +44 -0
  295. package/docs/shared/react/guides/policy-packs.md +173 -0
  296. package/docs/shared/react/guides/script-loader.md +309 -0
  297. package/docs/shared/react/hooks/use-color-scheme.md +31 -0
  298. package/docs/shared/react/hooks/use-consent-manager/checking-consent.md +95 -0
  299. package/docs/shared/react/hooks/use-consent-manager/location-info.md +96 -0
  300. package/docs/shared/react/hooks/use-consent-manager/overview.md +74 -0
  301. package/docs/shared/react/hooks/use-consent-manager/setting-consent.md +93 -0
  302. package/docs/shared/react/hooks/use-draggable.md +30 -0
  303. package/docs/shared/react/hooks/use-focus-trap.md +20 -0
  304. package/docs/shared/react/hooks/use-reduced-motion.md +33 -0
  305. package/docs/shared/react/hooks/use-ssr-status.md +16 -0
  306. package/docs/shared/react/hooks/use-text-direction.md +38 -0
  307. package/docs/shared/react/hooks/use-translations.md +15 -0
  308. package/docs/shared/react/iab/consent-banner.md +60 -0
  309. package/docs/shared/react/iab/consent-dialog.md +76 -0
  310. package/docs/shared/react/iab/overview.md +80 -0
  311. package/docs/shared/react/iab/use-gvl-data.md +21 -0
  312. package/docs/shared/react/styling/classnames.md +93 -0
  313. package/docs/shared/react/styling/color-scheme.md +35 -0
  314. package/docs/shared/react/styling/css-variables.md +53 -0
  315. package/docs/shared/react/styling/overview.md +261 -0
  316. package/docs/shared/react/styling/slots.md +93 -0
  317. package/docs/shared/react/styling/stylesheet-entrypoint.md +8 -0
  318. package/docs/shared/react/styling/tailwind.md +88 -0
  319. package/docs/shared/react/styling/tokens.md +155 -0
  320. package/docs/shared/troubleshooting.md +82 -0
  321. package/package.json +23 -12
  322. package/readme.json +12 -7
  323. package/docs/ai-agents.md +0 -111
  324. package/docs/components/consent-dialog-trigger.md +0 -103
  325. package/docs/components/consent-manager-provider.md +0 -425
  326. package/docs/hooks/use-consent-manager/overview.md +0 -420
  327. package/docs/hooks/use-translations.md +0 -118
  328. package/docs/script-loader.md +0 -321
  329. package/docs/styling/css-variables.md +0 -92
  330. package/docs/styling/overview.md +0 -460
  331. package/docs/styling/slots.md +0 -128
  332. package/docs/styling/tokens.md +0 -216
@@ -0,0 +1,261 @@
1
+ ---
2
+ title: Overview
3
+ description: Reference page for overview.
4
+ group: reference
5
+ ---
6
+ c15t's theming system gives you multiple levels of control, but most customization should stay inside the pre-built components.
7
+
8
+ Start with the lowest-power tool that solves the problem:
9
+
10
+ 1. **Pre-built component APIs** — provider options and component props such as `layout`, `direction`, `primaryButton`, `legalLinks`, and `theme.consentActions`
11
+ 2. **Design tokens** — global colors, typography, spacing, radius, shadows, and motion
12
+ 3. **Slots** — targeted styling for specific parts such as the banner card, footer, or title
13
+ 4. **CSS variables or className-level overrides** — when you need to integrate with external CSS systems
14
+ 5. **Compound components** — when you must rearrange markup while still using c15t primitives
15
+ 6. **`noStyle`** — when you want c15t structure but you need to own all visual styling
16
+ 7. **Headless** — when you want fully custom markup and behavior
17
+
18
+ Keep styling and escalation as separate decisions:
19
+
20
+ * If you are still using the stock banner, dialog, or widget, stay with props, tokens, and slots.
21
+ * Escalate to compound components, `noStyle`, or headless only when the structure or behavior itself must change.
22
+
23
+ ## Styling Approaches
24
+
25
+ |Approach|Control|Use When|
26
+ |--|--|--|
27
+ |**Component and provider APIs**|High|Reordering actions, changing button emphasis, configuring links, hiding branding, changing copy via `i18n`|
28
+ |**Tokens**|High|Changing global colors, typography, spacing, radius, shadows, or motion|
29
+ |**Slots**|Medium|Targeting specific component parts (for example `consentBannerFooter` or `consentDialogCard`)|
30
+ |**CSS variables / className**|Medium|Integrating with an existing stylesheet or utility classes after tokens and slots|
31
+ |**Compound components**|Structure|Rearranging existing c15t primitives without going fully custom|
32
+ |**noStyle**|Full visuals|Keeping c15t structure but replacing all visual defaults|
33
+ |**Headless**|Full|Replacing both markup and behavior|
34
+
35
+ ## Styling Inside Pre-Built Components
36
+
37
+ Start here before you consider compound components or headless mode.
38
+
39
+ ### 1. Provider and component configuration
40
+
41
+ Use the stock APIs first:
42
+
43
+ * `layout`, `direction`, and `primaryButton` for banner action arrangement
44
+ * `legalLinks` for link visibility
45
+ * `hideBranding` and `showTrigger` for dialog and widget behavior
46
+ * `theme.consentActions` for stock banner and dialog button treatment
47
+ * `i18n` on `ConsentManagerProvider` for copy changes
48
+
49
+ ```tsx
50
+ <ConsentBanner layout={['customize', ['reject', 'accept']]} primaryButton="accept" />
51
+ ```
52
+
53
+ ### 2. Design tokens
54
+
55
+ Set global values for colors, typography, spacing, radius, shadows, and motion:
56
+
57
+ ```tsx
58
+ options={{ theme: { colors: { primary: '#6366f1' } } }}
59
+ ```
60
+
61
+ Use tokens first when the change is semantic:
62
+
63
+ * Banner card background -> `theme.colors.surface`
64
+ * Banner footer background -> `theme.colors.surfaceHover`
65
+ * Shared copy color -> `theme.colors.text` and `theme.colors.textMuted`
66
+ * Primary-filled surfaces such as stock branding tags and filled actions -> `theme.colors.primary` with `theme.colors.textOnPrimary` as the matching foreground override
67
+
68
+ ```tsx
69
+ options={{
70
+ theme: {
71
+ colors: {
72
+ surface: '#ffffff',
73
+ surfaceHover: '#f6f3ee',
74
+ },
75
+ },
76
+ }}
77
+ ```
78
+
79
+ If you set `theme.colors.primary` but omit `theme.colors.textOnPrimary`, c15t derives a readable foreground automatically. Add `textOnPrimary` only when you need to force a specific branded foreground color.
80
+
81
+ ### 3. Component slots
82
+
83
+ Target specific component parts via the `slots` object:
84
+
85
+ ```tsx
86
+ options={{
87
+ theme: {
88
+ slots: {
89
+ consentBannerCard: 'rounded-[28px] shadow-xl',
90
+ consentBannerFooter: 'border-t border-black/10',
91
+ consentBannerTitle: 'tracking-tight',
92
+ },
93
+ },
94
+ }}
95
+ ```
96
+
97
+ Use slots when the component part is right but the local styling needs adjustment.
98
+
99
+ ### 4. CSS variables and className-level overrides
100
+
101
+ Override `--c15t-*` custom properties in your stylesheet or attach classes through slots when your app styling is driven externally.
102
+
103
+ Reach for this after tokens and slots, not before.
104
+
105
+ ```tsx
106
+ options={{
107
+ theme: {
108
+ slots: {
109
+ consentBannerFooter: 'bg-[var(--banner-footer)]',
110
+ },
111
+ },
112
+ }}
113
+ ```
114
+
115
+ ## Escalating Beyond Pre-Built Components
116
+
117
+ Only move up this ladder when the lower rung cannot satisfy the request.
118
+
119
+ ### 5. Compound components
120
+
121
+ Use compound components when you need to rearrange existing c15t primitives:
122
+
123
+ ```tsx
124
+ <ConsentBanner.Root>
125
+ <ConsentBanner.Card>
126
+ <ConsentBanner.Header>
127
+ <ConsentBanner.Title />
128
+ <ConsentBanner.Description />
129
+ </ConsentBanner.Header>
130
+ <ConsentBanner.Footer>
131
+ <ConsentBanner.CustomizeButton />
132
+ <ConsentBanner.FooterSubGroup>
133
+ <ConsentBanner.RejectButton />
134
+ <ConsentBanner.AcceptButton />
135
+ </ConsentBanner.FooterSubGroup>
136
+ </ConsentBanner.Footer>
137
+ </ConsentBanner.Card>
138
+ </ConsentBanner.Root>
139
+ ```
140
+
141
+ ### 6. `noStyle`
142
+
143
+ Use `noStyle` only when the c15t structure is still correct but you want to replace all visual defaults:
144
+
145
+ ```tsx
146
+ <ConsentBanner noStyle />
147
+ ```
148
+
149
+ ### 7. Headless
150
+
151
+ Go headless only when you are replacing both markup and behavior. For that path, continue to [Headless Mode](../headless).
152
+
153
+ ## Common Styling Tasks
154
+
155
+ ### Change the banner footer background
156
+
157
+ ```tsx
158
+ options={{
159
+ theme: {
160
+ colors: {
161
+ surfaceHover: '#f6f3ee',
162
+ },
163
+ },
164
+ }}
165
+ ```
166
+
167
+ Use `theme.colors.surfaceHover` before trying raw CSS.
168
+
169
+ ### Change the banner card background
170
+
171
+ ```tsx
172
+ options={{
173
+ theme: {
174
+ colors: {
175
+ surface: '#fffdf8',
176
+ },
177
+ },
178
+ }}
179
+ ```
180
+
181
+ Use `theme.colors.surface` before overriding banner CSS variables directly.
182
+
183
+ ### Tweak the banner card, footer, or title styling without changing markup
184
+
185
+ ```tsx
186
+ options={{
187
+ theme: {
188
+ slots: {
189
+ consentBannerCard: 'rounded-[28px] shadow-xl',
190
+ consentBannerFooter: 'border-t border-black/10 px-6',
191
+ consentBannerTitle: 'text-xl tracking-tight',
192
+ },
193
+ },
194
+ }}
195
+ ```
196
+
197
+ ### Change stock consent action button styles semantically
198
+
199
+ ```tsx
200
+ options={{
201
+ theme: {
202
+ consentActions: {
203
+ default: { mode: 'stroke' },
204
+ accept: { variant: 'primary', mode: 'stroke' },
205
+ customize: { variant: 'neutral', mode: 'ghost' },
206
+ },
207
+ },
208
+ }}
209
+ ```
210
+
211
+ Use `theme.consentActions` when you want to change the stock banner/dialog button treatment without rewriting the component layout. Policy packs still control action arrangement and primary-action hints. The theme controls whether those actions render as `stroke`, `filled`, `ghost`, or `lighter`.
212
+
213
+ ### Change banner copy without replacing the component
214
+
215
+ ```tsx
216
+ options={{
217
+ i18n: {
218
+ locale: 'en',
219
+ messages: {
220
+ en: {
221
+ cookieBanner: {
222
+ title: 'We value your privacy',
223
+ description: 'We use cookies to improve the site and measure performance.',
224
+ },
225
+ common: {
226
+ acceptAll: 'Accept all',
227
+ rejectAll: 'Reject all',
228
+ customize: 'Manage preferences',
229
+ },
230
+ },
231
+ },
232
+ },
233
+ }}
234
+ ```
235
+
236
+ ### Enable dark mode safely
237
+
238
+ ```tsx
239
+ options={{
240
+ colorScheme: 'system',
241
+ theme: {
242
+ colors: { surface: '#ffffff', text: '#1f2937' },
243
+ dark: { surface: '#111827', text: '#f9fafb' },
244
+ },
245
+ }}
246
+ ```
247
+
248
+ > ℹ️ **Info:**
249
+ > If a token change does not show up where you expect, check how that component maps tokens to CSS variables before escalating. For example, the stock banner footer background comes from colors.surfaceHover, not a separate footer token.
250
+ >
251
+ > ⚠️ **Warning:**
252
+ > Do not jump to CSS overrides or !important because a token did not appear to work at first glance.noStyle: true removes layout and visual defaults. Treat it as an advanced opt-out, not a normal theming step.Headless mode is for replacing markup and behavior, not for styling-only requests.Use either tokens/slots or raw CSS variable overrides intentionally to avoid conflicting style sources.For dark mode, c15t supports .dark and .c15t-dark.
253
+
254
+ ## API Reference
255
+
256
+ |Property|Value|
257
+ |:--|:--|
258
+ |Type Name|\`Theme\`|
259
+ |Source Path|\`./packages/ui/src/theme/types.ts\`|
260
+
261
+ \*ExtractedTypeTable: Could not extract "Theme" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
@@ -0,0 +1,93 @@
1
+ ---
2
+ title: Slots
3
+ description: Reference page for slots.
4
+ group: reference
5
+ ---
6
+ ## What are Slots?
7
+
8
+ Slots let you target specific parts of consent components with styles. Each component is built from named slots such as `consentBannerTitle` and `consentDialogTag`.
9
+
10
+ Use slots after the stock component APIs and design tokens:
11
+
12
+ * If the change is semantic, prefer tokens first. For example, the stock banner footer background comes from `theme.colors.surfaceHover`.
13
+ * If the component part is correct but you need a local tweak, use a slot.
14
+
15
+ Common banner slot choices:
16
+
17
+ * `consentBannerCard` for card radius, shadow, width, and local background treatment
18
+ * `consentBannerFooter` for spacing, borders, and local footer styling
19
+ * `consentBannerTitle` for title typography
20
+ * `buttonPrimary` and `buttonSecondary` for shared button classes
21
+
22
+ ## Using Slots
23
+
24
+ Pass slot styles in the theme's `slots` object:
25
+
26
+ ```tsx
27
+ const theme = {
28
+ slots: {
29
+ consentBannerFooter: 'border-t border-black/10 px-6',
30
+ consentBannerTitle: 'text-xl font-bold tracking-tight',
31
+
32
+ // Object value = className + inline styles
33
+ consentBannerCard: {
34
+ className: 'rounded-xl shadow-lg',
35
+ style: { maxWidth: '600px' },
36
+ },
37
+ },
38
+ } satisfies Theme;
39
+ ```
40
+
41
+ ## Slot Style Types
42
+
43
+ Each slot accepts either a `string` (treated as className) or a `SlotStyle` object:
44
+
45
+ ```tsx
46
+ // String: treated as className
47
+ consentBannerTitle: 'my-custom-class'
48
+
49
+ // Object: className + style + noStyle
50
+ consentBannerFooter: {
51
+ className: 'border-t border-black/10',
52
+ style: { paddingBlock: '1rem' },
53
+ noStyle: false, // Set true only when you want to remove this slot's default styling
54
+ }
55
+ ```
56
+
57
+ `noStyle` on a slot is an advanced escape hatch. Start with className and style overrides first.
58
+
59
+ ## Example: Style the stock banner without changing markup
60
+
61
+ ```tsx
62
+ const theme = {
63
+ colors: {
64
+ surface: '#fffdf8',
65
+ surfaceHover: '#f6f3ee',
66
+ },
67
+ slots: {
68
+ consentBannerCard: 'rounded-[28px] shadow-xl',
69
+ consentBannerFooter: 'border-t border-black/10 px-6',
70
+ consentBannerTitle: 'tracking-tight',
71
+ },
72
+ } satisfies Theme;
73
+ ```
74
+
75
+ ## Available Slots
76
+
77
+ Use the typed API reference below for the full slot list and descriptions. It stays in sync with the actual component slot surface.
78
+
79
+ ## API Reference
80
+
81
+ |Property|Value|
82
+ |:--|:--|
83
+ |Type Name|\`ComponentSlots\`|
84
+ |Source Path|\`./packages/ui/src/theme/types.ts\`|
85
+
86
+ \*ExtractedTypeTable: Could not extract "ComponentSlots" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
87
+
88
+ |Property|Value|
89
+ |:--|:--|
90
+ |Type Name|\`SlotStyle\`|
91
+ |Source Path|\`./packages/ui/src/theme/types.ts\`|
92
+
93
+ \*ExtractedTypeTable: Could not extract "SlotStyle" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
@@ -0,0 +1,8 @@
1
+ ---
2
+ title: Stylesheet Entrypoint
3
+ description: Reference page for stylesheet entrypoint.
4
+ group: reference
5
+ ---
6
+ 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.
7
+
8
+ With Tailwind v4, keep c15t at the end of the top-level `@import` block so Fumadocs, `tw-animate-css`, and other preset imports do not override c15t theme tokens.
@@ -0,0 +1,88 @@
1
+ ---
2
+ title: Tailwind
3
+ description: Reference page for tailwind.
4
+ group: reference
5
+ ---
6
+ c15t works with Tailwind CSS out of the box. Use the `slots` theme option to apply Tailwind utility classes to any component part.
7
+
8
+ ## Setup
9
+
10
+ Import the standard c15t stylesheet once in your app-level CSS entrypoint:
11
+
12
+ ```css
13
+ /* React: src/index.css */
14
+ @import "@c15t/react/styles.css";
15
+
16
+ /* Next.js: app/globals.css */
17
+ @import "@c15t/nextjs/styles.css";
18
+ ```
19
+
20
+ 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.
21
+
22
+ With Tailwind v4, keep c15t at the end of the top-level `@import` block so Fumadocs, `tw-animate-css`, and other preset imports do not override c15t theme tokens.
23
+
24
+ ### Tailwind v4
25
+
26
+ Tailwind v4 automatically scans your source files. Import Tailwind normally, then keep the c15t stylesheet last in the top-level `@import` block so Fumadocs, `tw-animate-css`, or other preset styles load first. c15t component styles join Tailwind's `components` layer automatically, so no extra c15t-specific layer declaration is needed:
27
+
28
+ ```css title="src/index.css"
29
+ @import "tailwindcss";
30
+ @import "tw-animate-css";
31
+ @import "@c15t/react/styles.css";
32
+ ```
33
+
34
+ ```css title="app/globals.css"
35
+ @import "tailwindcss";
36
+ @import "tw-animate-css";
37
+ @import "@c15t/nextjs/styles.css";
38
+ ```
39
+
40
+ ### Tailwind v3
41
+
42
+ Import the Tailwind 3-compatible c15t stylesheet after `@tailwind components;` and before `@tailwind utilities;`:
43
+
44
+ ```css title="src/index.css"
45
+ @tailwind base;
46
+ @tailwind components;
47
+ @import "@c15t/react/styles.tw3.css";
48
+ @tailwind utilities;
49
+ ```
50
+
51
+ ```css title="app/globals.css"
52
+ @tailwind base;
53
+ @tailwind components;
54
+ @import "@c15t/nextjs/styles.tw3.css";
55
+ @tailwind utilities;
56
+ ```
57
+
58
+ ## Dark Mode with Tailwind
59
+
60
+ Combine Tailwind's dark mode with c15t's `dark` tokens:
61
+
62
+ ```tsx
63
+ const theme = {
64
+ colors: {
65
+ primary: '#6366f1',
66
+ surface: '#ffffff',
67
+ text: '#1f2937',
68
+ },
69
+ dark: {
70
+ primary: '#818cf8',
71
+ surface: '#1f2937',
72
+ text: '#f9fafb',
73
+ },
74
+ slots: {
75
+ consentBannerCard: 'bg-white dark:bg-gray-900 shadow-lg dark:shadow-gray-900/30',
76
+ consentBannerTitle: 'text-gray-900 dark:text-gray-100',
77
+ },
78
+ } satisfies Theme;
79
+ ```
80
+
81
+ ## Optional: noStyle Mode
82
+
83
+ If you want Tailwind to own all layout and visual styling, use `noStyle: true`.
84
+
85
+ > ℹ️ **Info:**
86
+ > When using noStyle: true with Tailwind, you're responsible for all layout and visual styling. Start with slots first, then switch to noStyle only when you need full control.
87
+
88
+ For full custom markup (not just styles), see [Headless Mode](../headless).
@@ -0,0 +1,155 @@
1
+ ---
2
+ title: Tokens
3
+ description: Reference page for tokens.
4
+ group: reference
5
+ ---
6
+ ## Color Tokens
7
+
8
+ Color tokens define the palette for all consent components. Set `colors` for light mode and `dark` for dark mode overrides.
9
+
10
+ When `textOnPrimary` is omitted, c15t derives it automatically from `primary` to keep text readable on primary-filled surfaces such as stock branding tags and buttons. Set `textOnPrimary` explicitly when you need a specific foreground color.
11
+
12
+ ```tsx
13
+ const theme = {
14
+ colors: {
15
+ primary: '#6366f1',
16
+ primaryHover: '#4f46e5',
17
+ surface: '#ffffff',
18
+ surfaceHover: '#f9fafb',
19
+ border: '#e5e7eb',
20
+ borderHover: '#d1d5db',
21
+ text: '#1f2937',
22
+ textMuted: '#6b7280',
23
+ textOnPrimary: '#ffffff',
24
+ overlay: 'rgba(0, 0, 0, 0.5)',
25
+ switchTrack: '#d1d5db',
26
+ switchTrackActive: '#6366f1',
27
+ switchThumb: '#ffffff',
28
+ },
29
+ dark: {
30
+ primary: '#818cf8',
31
+ surface: '#1f2937',
32
+ text: '#f9fafb',
33
+ textMuted: '#9ca3af',
34
+ border: '#374151',
35
+ },
36
+ } satisfies Theme;
37
+ ```
38
+
39
+ |Property|Value|
40
+ |:--|:--|
41
+ |Type Name|\`ColorTokens\`|
42
+ |Source Path|\`./packages/ui/src/theme/types.ts\`|
43
+
44
+ \*ExtractedTypeTable: Could not extract "ColorTokens" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
45
+
46
+ ## Typography Tokens
47
+
48
+ Control font family, sizes, weights, and line heights.
49
+
50
+ ```tsx
51
+ const theme = {
52
+ typography: {
53
+ fontFamily: 'Inter, system-ui, sans-serif',
54
+ fontSize: { sm: '0.875rem', base: '1rem', lg: '1.125rem' },
55
+ fontWeight: { normal: 400, medium: 500, semibold: 600 },
56
+ lineHeight: { tight: '1.25', normal: '1.5', relaxed: '1.75' },
57
+ },
58
+ } satisfies Theme;
59
+ ```
60
+
61
+ |Property|Value|
62
+ |:--|:--|
63
+ |Type Name|\`TypographyTokens\`|
64
+ |Source Path|\`./packages/ui/src/theme/types.ts\`|
65
+
66
+ \*ExtractedTypeTable: Could not extract "TypographyTokens" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
67
+
68
+ ## Spacing Tokens
69
+
70
+ Five-step scale for internal padding, margins, and gaps.
71
+
72
+ ```tsx
73
+ const theme = {
74
+ spacing: {
75
+ xs: '0.25rem', // 4px
76
+ sm: '0.5rem', // 8px
77
+ md: '1rem', // 16px
78
+ lg: '1.5rem', // 24px
79
+ xl: '2rem', // 32px
80
+ },
81
+ } satisfies Theme;
82
+ ```
83
+
84
+ |Property|Value|
85
+ |:--|:--|
86
+ |Type Name|\`SpacingTokens\`|
87
+ |Source Path|\`./packages/ui/src/theme/types.ts\`|
88
+
89
+ \*ExtractedTypeTable: Could not extract "SpacingTokens" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
90
+
91
+ ## Radius Tokens
92
+
93
+ Border radius scale for rounded corners.
94
+
95
+ ```tsx
96
+ const theme = {
97
+ radius: {
98
+ sm: '0.25rem', // 4px
99
+ md: '0.5rem', // 8px
100
+ lg: '0.75rem', // 12px
101
+ full: '9999px', // Pill shape
102
+ },
103
+ } satisfies Theme;
104
+ ```
105
+
106
+ |Property|Value|
107
+ |:--|:--|
108
+ |Type Name|\`RadiusTokens\`|
109
+ |Source Path|\`./packages/ui/src/theme/types.ts\`|
110
+
111
+ \*ExtractedTypeTable: Could not extract "RadiusTokens" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
112
+
113
+ ## Shadow Tokens
114
+
115
+ Box shadow scale for depth and elevation.
116
+
117
+ ```tsx
118
+ const theme = {
119
+ shadows: {
120
+ sm: '0 1px 2px hsla(0, 0%, 0%, 0.05)',
121
+ md: '0 4px 12px hsla(0, 0%, 0%, 0.08)',
122
+ lg: '0 8px 24px hsla(0, 0%, 0%, 0.12)',
123
+ },
124
+ } satisfies Theme;
125
+ ```
126
+
127
+ |Property|Value|
128
+ |:--|:--|
129
+ |Type Name|\`ShadowTokens\`|
130
+ |Source Path|\`./packages/ui/src/theme/types.ts\`|
131
+
132
+ \*ExtractedTypeTable: Could not extract "ShadowTokens" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
133
+
134
+ ## Motion Tokens
135
+
136
+ Animation duration and easing presets.
137
+
138
+ ```tsx
139
+ const theme = {
140
+ motion: {
141
+ duration: { fast: '100ms', normal: '200ms', slow: '300ms' },
142
+ easing: 'cubic-bezier(0.4, 0, 0.2, 1)',
143
+ easingOut: 'cubic-bezier(0.215, 0.61, 0.355, 1)',
144
+ easingInOut: 'cubic-bezier(0.645, 0.045, 0.355, 1)',
145
+ easingSpring: 'cubic-bezier(0.34, 1.56, 0.64, 1)',
146
+ },
147
+ } satisfies Theme;
148
+ ```
149
+
150
+ |Property|Value|
151
+ |:--|:--|
152
+ |Type Name|\`MotionTokens\`|
153
+ |Source Path|\`./packages/ui/src/theme/types.ts\`|
154
+
155
+ \*ExtractedTypeTable: Could not extract "MotionTokens" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
@@ -0,0 +1,82 @@
1
+ ---
2
+ title: Troubleshooting
3
+ description: Reference page for troubleshooting.
4
+ group: reference
5
+ ---
6
+ ## "Provider not found" Error
7
+
8
+ **Symptom:** `useConsentManager must be used within a ConsentManagerProvider` error.
9
+
10
+ **Fix:** Ensure the component calling `useConsentManager()` (or any c15t hook) is rendered inside a `ConsentManagerProvider`:
11
+
12
+ ```tsx
13
+ // Wrong — hook is outside the provider
14
+ function App() {
15
+ const { consents } = useConsentManager(); // throws
16
+ return <ConsentManagerProvider options={...}>...</ConsentManagerProvider>;
17
+ }
18
+
19
+ // Correct — hook is inside the provider
20
+ function App() {
21
+ return (
22
+ <ConsentManagerProvider options={...}>
23
+ <MyComponent /> {/* useConsentManager works here */}
24
+ </ConsentManagerProvider>
25
+ );
26
+ }
27
+ ```
28
+
29
+ ## Banner Doesn't Show
30
+
31
+ **Possible causes:**
32
+
33
+ 1. **Opt-out jurisdiction** — In CCPA/opt-out regions, the banner is not shown because tracking is allowed by default. Check `model` from `useConsentManager()` — if it's `'opt-out'`, the banner is intentionally hidden.
34
+
35
+ 2. **Consent already given** — If the user has already made a consent choice, the banner won't reappear. Clear cookies or use `resetConsents()` to test again.
36
+
37
+ 3. **`activeUI` is `'none'`** — Something is explicitly setting `activeUI` to `'none'`. Check the DevTools panel for the current consent state.
38
+
39
+ 4. **Backend not responding** — In `'c15t'` mode, the banner waits for the backend `/init` response. Check the Network tab for failed requests to your `backendURL`.
40
+
41
+ ```tsx
42
+ // Debug: check what the consent manager sees
43
+ const { activeUI, model, isLoadingConsentInfo } = useConsentManager();
44
+ console.log({ activeUI, model, isLoadingConsentInfo });
45
+ ```
46
+
47
+ ## Consent Not Persisting
48
+
49
+ **Symptom:** Consent is lost after page reload.
50
+
51
+ **Possible causes:**
52
+
53
+ 1. **Incognito/private mode** — Some browsers restrict cookie storage in private browsing.
54
+
55
+ 2. **Cookie settings** — In `'offline'` mode, consent is stored in cookies. Ensure cookies are not being blocked by browser settings or extensions.
56
+
57
+ 3. **Different domains** — Cookies are domain-scoped. If your dev server uses a different domain than production, consent won't carry over.
58
+
59
+ 4. **Backend errors** — In `'c15t'` mode, check that the backend is saving consent successfully. Enable `debug: true` in provider options to see detailed logs.
60
+
61
+ ## Scripts Not Loading
62
+
63
+ **Symptom:** Third-party scripts configured in the `scripts` option don't load after consent is granted.
64
+
65
+ **Checklist:**
66
+
67
+ 1. **Wrong category name** — The `category` on the script must match one of the `consentCategories` names. For example, `'measurement'` not `'analytics'`.
68
+
69
+ 2. **Consent condition not met** — Use `has('measurement')` to verify the category is actually consented.
70
+
71
+ 3. **Script error** — Check the browser DevTools Console for script loading errors. The `onError` callback can help debug:
72
+
73
+ ```tsx
74
+ {
75
+ id: 'analytics',
76
+ src: 'https://...',
77
+ category: 'measurement',
78
+ onError: ({ error }) => console.error('Script failed:', error),
79
+ }
80
+ ```
81
+
82
+ 4. **Ad blocker** — Browser extensions may block the script regardless of consent. The `anonymizeId` option (default: `true`) helps avoid pattern-based blocking.