@c15t/react 3.0.0-alpha.1 → 3.0.0-alpha.11

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 (413) hide show
  1. package/AGENTS.md +97 -70
  2. package/README.md +21 -17
  3. package/SKILL.md +34 -0
  4. package/dist/aggregate-components.js +1 -1
  5. package/dist/chunk-warming.js +1 -1
  6. package/dist/component-hooks/use-headless-consent-ui.js +1 -1
  7. package/dist/component-hooks/use-headless-iab-consent-ui.js +1 -1
  8. package/dist/component-hooks/use-panel-trigger.js +1 -1
  9. package/dist/components/consent-gate/atoms.js +1 -0
  10. package/dist/components/consent-gate/consent-gate.js +2 -0
  11. package/dist/components/consent-gate/frame.js +2 -0
  12. package/dist/components/consent-gate/index.js +2 -0
  13. package/dist/components/consent-preferences-link/consent-preferences-link.js +1 -1
  14. package/dist/components/iab-panel/atoms/card.js +1 -1
  15. package/dist/components/iab-panel/atoms/feature-item.js +2 -0
  16. package/dist/components/iab-panel/atoms/header.js +1 -1
  17. package/dist/components/iab-panel/atoms/purpose-item.js +1 -1
  18. package/dist/components/iab-panel/atoms/root.js +1 -1
  19. package/dist/components/iab-panel/atoms/stack-item.js +1 -1
  20. package/dist/components/iab-panel/atoms/vendor-list.js +1 -1
  21. package/dist/components/iab-panel/hooks/use-gvl-data.js +1 -1
  22. package/dist/components/iab-panel/iab-panel.js +1 -1
  23. package/dist/components/iab-panel/index.js +1 -1
  24. package/dist/components/iab-prompt/atoms/overlay.js +1 -1
  25. package/dist/components/iab-prompt/atoms/root.js +1 -1
  26. package/dist/components/iab-prompt/iab-prompt.js +1 -1
  27. package/dist/components/panel/atoms/card.js +1 -1
  28. package/dist/components/panel/atoms/overlay.js +1 -1
  29. package/dist/components/panel/atoms/root.js +1 -1
  30. package/dist/components/panel/panel.js +1 -1
  31. package/dist/components/panel-trigger/atoms/button.js +1 -1
  32. package/dist/components/panel-trigger/atoms/icon.js +1 -1
  33. package/dist/components/panel-trigger/atoms/root.js +1 -1
  34. package/dist/components/panel-trigger/atoms/toolbar.js +1 -1
  35. package/dist/components/panel-trigger/atoms/trigger-icons.js +1 -0
  36. package/dist/components/panel-trigger/panel-trigger-toolbar.js +1 -1
  37. package/dist/components/panel-trigger/panel-trigger.js +1 -1
  38. package/dist/components/panel-trigger/toolbar-loader.js +2 -0
  39. package/dist/components/preferences/atoms/accordion.js +1 -1
  40. package/dist/components/preferences/atoms/root.js +1 -1
  41. package/dist/components/preferences/atoms/vendor-list.js +1 -0
  42. package/dist/components/preferences/index.js +1 -1
  43. package/dist/components/prompt/atoms/early-tap-script.js +2 -0
  44. package/dist/components/prompt/atoms/overlay.js +1 -1
  45. package/dist/components/prompt/atoms/root.js +1 -1
  46. package/dist/components/prompt/components.js +1 -1
  47. package/dist/components/prompt/policy-actions.js +1 -1
  48. package/dist/components/prompt/prompt.js +1 -1
  49. package/dist/components/shared/dialog-sheets.js +1 -0
  50. package/dist/components/shared/first-paint-sheets.js +1 -0
  51. package/dist/components/shared/iab-dialog-sheets.js +1 -0
  52. package/dist/components/shared/iab-first-paint-sheets.js +1 -0
  53. package/dist/components/shared/libs/compose-refs.js +1 -0
  54. package/dist/components/shared/libs/slot.js +1 -1
  55. package/dist/components/shared/primitives/button.js +1 -1
  56. package/dist/components/shared/primitives/legal-links/index.js +1 -1
  57. package/dist/components/shared/streamed-surface.js +2 -0
  58. package/dist/components/shared/surface-styles.js +2 -0
  59. package/dist/components/shared/ui/dialog/dialog.js +1 -1
  60. package/dist/components/shared/ui/icon.js +1 -1
  61. package/dist/components/shared/ui/logo.js +1 -1
  62. package/dist/components/shared/ui/preference-item/preference-item.js +1 -1
  63. package/dist/consent-gate.js +2 -0
  64. package/dist/consent-theme.js +1 -0
  65. package/dist/context/consent-tracking-context.js +1 -1
  66. package/dist/context/index.js +1 -1
  67. package/dist/context.js +1 -1
  68. package/dist/devtools-launcher.js +2 -0
  69. package/dist/devtools.js +1 -1
  70. package/dist/draft-context.js +2 -0
  71. package/dist/draft.js +1 -1
  72. package/dist/external-iab-context.js +1 -1
  73. package/dist/gpp.js +2 -0
  74. package/dist/headless.js +1 -1
  75. package/dist/hooks/use-color-scheme.js +1 -1
  76. package/dist/hooks/use-committed-ref.js +2 -0
  77. package/dist/hooks/use-focus-trap.js +1 -1
  78. package/dist/hooks/use-headless-iab-consent-ui.js +1 -1
  79. package/dist/hooks/use-iab-policy-guard.js +1 -0
  80. package/dist/hooks/use-late-entry.js +2 -0
  81. package/dist/hooks.js +1 -1
  82. package/dist/iab/styles.tw3.css +5 -45
  83. package/dist/iab-context.js +1 -1
  84. package/dist/iab-dialog-deferred.js +2 -0
  85. package/dist/iab.js +1 -1
  86. package/dist/index-parts/consent-banner.js +1 -0
  87. package/dist/index-parts/consent-dialog-link.js +1 -0
  88. package/dist/index-parts/consent-dialog-trigger.js +1 -0
  89. package/dist/index-parts/consent-dialog.js +1 -0
  90. package/dist/index-parts/consent-gate.js +1 -0
  91. package/dist/index-parts/core.js +1 -0
  92. package/dist/index-parts/draft.js +1 -0
  93. package/dist/index-parts/frame.js +1 -0
  94. package/dist/index-parts/hooks.js +1 -0
  95. package/dist/index-parts/hosted.js +1 -0
  96. package/dist/index-parts/module-hooks.js +1 -0
  97. package/dist/index-parts/offline.js +1 -0
  98. package/dist/index-parts/presets.js +1 -0
  99. package/dist/index-parts/provider.js +1 -0
  100. package/dist/index-parts/theme.js +1 -0
  101. package/dist/index-parts/translations.js +1 -0
  102. package/dist/index.js +1 -1
  103. package/dist/kernel-selector.js +1 -0
  104. package/dist/modes.js +1 -0
  105. package/dist/module-hooks/iframe-blocker.js +1 -1
  106. package/dist/module-hooks/network-blocker.js +1 -1
  107. package/dist/module-hooks/network-hold.js +2 -0
  108. package/dist/module-hooks/persistence.js +1 -1
  109. package/dist/panel-link.js +1 -1
  110. package/dist/panel-trigger.js +1 -1
  111. package/dist/panel.js +1 -1
  112. package/dist/postcss-tailwind3.js +1 -0
  113. package/dist/preferences.js +1 -2
  114. package/dist/provider.js +1 -1
  115. package/dist/server/fetch-ssr-data.js +1 -1
  116. package/dist/server/headers.js +1 -1
  117. package/dist/server/normalize-url.js +1 -1
  118. package/dist/styles.tw3.css +33 -51
  119. package/dist/transports/hosted.js +1 -0
  120. package/dist/transports/manifest.js +1 -0
  121. package/dist/transports/offline.js +1 -1
  122. package/dist/utils/deferred-module.js +2 -0
  123. package/dist/utils/merge-slot-props.js +1 -1
  124. package/dist/utils/theme-utils.js +1 -1
  125. package/dist/version.js +1 -1
  126. package/dist-types/aggregate-components.d.ts +2 -2
  127. package/dist-types/chunk-warming.d.ts +42 -8
  128. package/dist-types/component-hooks/use-headless-consent-ui.d.ts +5 -5
  129. package/dist-types/component-hooks/use-headless-iab-consent-ui.d.ts +2 -2
  130. package/dist-types/components/consent-gate/atoms.d.ts +11 -0
  131. package/dist-types/components/consent-gate/consent-gate.d.ts +2 -0
  132. package/dist-types/components/consent-gate/frame.d.ts +19 -0
  133. package/dist-types/components/consent-gate/index.d.ts +25 -0
  134. package/dist-types/components/{frame → consent-gate}/types.d.ts +7 -7
  135. package/dist-types/components/consent-preferences-link/consent-preferences-link.d.ts +1 -1
  136. package/dist-types/components/consent-preferences-link/index.d.ts +1 -1
  137. package/dist-types/components/iab-panel/atoms/feature-item.d.ts +28 -0
  138. package/dist-types/components/iab-panel/atoms/purpose-item.d.ts +5 -2
  139. package/dist-types/components/iab-panel/atoms/stack-item.d.ts +7 -2
  140. package/dist-types/components/iab-panel/atoms/vendor-list.d.ts +1 -1
  141. package/dist-types/components/iab-panel/iab-panel.d.ts +3 -3
  142. package/dist-types/components/iab-panel/index.d.ts +29 -26
  143. package/dist-types/components/iab-panel/use-iab-translations.d.ts +4 -0
  144. package/dist-types/components/iab-prompt/iab-prompt.d.ts +3 -3
  145. package/dist-types/components/iab-prompt/index.d.ts +19 -19
  146. package/dist-types/components/panel/atoms/card.d.ts +5 -4
  147. package/dist-types/components/panel/atoms/overlay.d.ts +1 -1
  148. package/dist-types/components/panel/index.d.ts +8 -8
  149. package/dist-types/components/panel/panel.d.ts +3 -3
  150. package/dist-types/components/panel-link/index.d.ts +1 -1
  151. package/dist-types/components/panel-trigger/atoms/button.d.ts +1 -1
  152. package/dist-types/components/panel-trigger/atoms/icon.d.ts +1 -1
  153. package/dist-types/components/panel-trigger/atoms/root.d.ts +2 -2
  154. package/dist-types/components/panel-trigger/atoms/toolbar.d.ts +2 -2
  155. package/dist-types/components/panel-trigger/atoms/trigger-icons.d.ts +25 -0
  156. package/dist-types/components/panel-trigger/index.d.ts +4 -4
  157. package/dist-types/components/panel-trigger/panel-trigger-toolbar.d.ts +1 -1
  158. package/dist-types/components/panel-trigger/panel-trigger.d.ts +9 -17
  159. package/dist-types/components/panel-trigger/toolbar-loader.d.ts +34 -0
  160. package/dist-types/components/panel-trigger/types.d.ts +1 -1
  161. package/dist-types/components/preferences/atoms/accordion.d.ts +6 -4
  162. package/dist-types/components/preferences/atoms/button.d.ts +1 -1
  163. package/dist-types/components/preferences/atoms/footer.d.ts +1 -1
  164. package/dist-types/components/preferences/atoms/root.d.ts +1 -1
  165. package/dist-types/components/preferences/atoms/vendor-list.d.ts +23 -0
  166. package/dist-types/components/preferences/index.d.ts +14 -12
  167. package/dist-types/components/preferences/policy-actions.d.ts +2 -2
  168. package/dist-types/components/preferences/preferences.d.ts +1 -1
  169. package/dist-types/components/preferences/types.d.ts +1 -1
  170. package/dist-types/components/prompt/atoms/early-tap-script.d.ts +17 -0
  171. package/dist-types/components/prompt/atoms/root.d.ts +4 -0
  172. package/dist-types/components/prompt/components.d.ts +9 -3
  173. package/dist-types/components/prompt/index.d.ts +12 -12
  174. package/dist-types/components/prompt/policy-actions.d.ts +2 -2
  175. package/dist-types/components/prompt/prompt.d.ts +5 -1
  176. package/dist-types/components/shared/dialog-sheets.d.ts +9 -0
  177. package/dist-types/components/shared/first-paint-sheets.d.ts +8 -0
  178. package/dist-types/components/shared/iab-dialog-sheets.d.ts +3 -0
  179. package/dist-types/components/shared/iab-first-paint-sheets.d.ts +3 -0
  180. package/dist-types/components/shared/libs/compose-refs.d.ts +20 -0
  181. package/dist-types/components/shared/policy-actions.d.ts +2 -2
  182. package/dist-types/components/shared/primitives/box.d.ts +1 -1
  183. package/dist-types/components/shared/primitives/button.d.ts +2 -2
  184. package/dist-types/components/shared/primitives/button.types.d.ts +1 -1
  185. package/dist-types/components/shared/streamed-surface.d.ts +23 -0
  186. package/dist-types/components/shared/surface-styles.d.ts +60 -0
  187. package/dist-types/components/shared/ui/accordion/accordion.d.ts +2 -2
  188. package/dist-types/components/shared/ui/accordion/index.d.ts +2 -2
  189. package/dist-types/components/shared/ui/animated-collapse/index.d.ts +2 -2
  190. package/dist-types/components/shared/ui/branding.d.ts +1 -1
  191. package/dist-types/components/shared/ui/button/button.d.ts +1 -1
  192. package/dist-types/components/shared/ui/button/index.d.ts +2 -2
  193. package/dist-types/components/shared/ui/collapsible/index.d.ts +1 -1
  194. package/dist-types/components/shared/ui/dialog/index.d.ts +1 -1
  195. package/dist-types/components/shared/ui/icon.d.ts +2 -1
  196. package/dist-types/components/shared/ui/logo.d.ts +0 -10
  197. package/dist-types/components/shared/ui/preference-item/index.d.ts +1 -1
  198. package/dist-types/components/shared/ui/preference-item/preference-item.d.ts +13 -0
  199. package/dist-types/components/shared/ui/switch/index.d.ts +2 -2
  200. package/dist-types/components/shared/ui/switch/switch.d.ts +1 -1
  201. package/dist-types/components/shared/ui/tabs/index.d.ts +1 -1
  202. package/dist-types/consent-gate.d.ts +1 -0
  203. package/dist-types/consent-theme.d.ts +38 -0
  204. package/dist-types/context/consent-tracking-context.d.ts +10 -0
  205. package/dist-types/context/index.d.ts +3 -3
  206. package/dist-types/context/theme-context.d.ts +3 -3
  207. package/dist-types/context.d.ts +25 -1
  208. package/dist-types/devtools-launcher.d.ts +29 -0
  209. package/dist-types/devtools.d.ts +13 -2
  210. package/dist-types/draft-context.d.ts +31 -0
  211. package/dist-types/draft.d.ts +81 -9
  212. package/dist-types/gpp.d.ts +27 -0
  213. package/dist-types/headless.d.ts +6 -7
  214. package/dist-types/hooks/use-committed-ref.d.ts +24 -0
  215. package/dist-types/hooks/use-focus-trap.d.ts +3 -1
  216. package/dist-types/hooks/use-headless-iab-consent-ui.d.ts +1 -1
  217. package/dist-types/hooks/use-iab-manager.d.ts +5 -5
  218. package/dist-types/hooks/use-iab-policy-guard.d.ts +35 -0
  219. package/dist-types/hooks/use-late-entry.d.ts +14 -0
  220. package/dist-types/hooks/use-theme.d.ts +1 -1
  221. package/dist-types/hooks.d.ts +106 -11
  222. package/dist-types/iab-dialog-deferred.d.ts +36 -0
  223. package/dist-types/iab.d.ts +8 -7
  224. package/dist-types/index-parts/consent-banner.d.ts +7 -0
  225. package/dist-types/index-parts/consent-dialog-link.d.ts +7 -0
  226. package/dist-types/index-parts/consent-dialog-trigger.d.ts +7 -0
  227. package/dist-types/index-parts/consent-dialog.d.ts +7 -0
  228. package/dist-types/index-parts/consent-gate.d.ts +7 -0
  229. package/dist-types/index-parts/core.d.ts +7 -0
  230. package/dist-types/index-parts/draft.d.ts +7 -0
  231. package/dist-types/index-parts/frame.d.ts +7 -0
  232. package/dist-types/index-parts/hooks.d.ts +7 -0
  233. package/dist-types/index-parts/hosted.d.ts +7 -0
  234. package/dist-types/index-parts/module-hooks.d.ts +7 -0
  235. package/dist-types/index-parts/offline.d.ts +7 -0
  236. package/dist-types/index-parts/presets.d.ts +7 -0
  237. package/dist-types/index-parts/provider.d.ts +7 -0
  238. package/dist-types/index-parts/theme.d.ts +8 -0
  239. package/dist-types/index-parts/translations.d.ts +7 -0
  240. package/dist-types/index.d.ts +32 -28
  241. package/dist-types/kernel-selector.d.ts +68 -0
  242. package/dist-types/modes.d.ts +26 -0
  243. package/dist-types/module-hooks/iframe-blocker.d.ts +33 -1
  244. package/dist-types/module-hooks/network-blocker.d.ts +23 -0
  245. package/dist-types/module-hooks/network-hold.d.ts +47 -0
  246. package/dist-types/module-hooks.d.ts +4 -4
  247. package/dist-types/panel-link.d.ts +1 -1
  248. package/dist-types/panel-trigger.d.ts +1 -1
  249. package/dist-types/panel.d.ts +13 -1
  250. package/dist-types/postcss-tailwind3.d.ts +21 -0
  251. package/dist-types/preferences.d.ts +12 -1
  252. package/dist-types/primitives/accordion.d.ts +1 -1
  253. package/dist-types/primitives/button.d.ts +1 -1
  254. package/dist-types/primitives/collapsible.d.ts +1 -1
  255. package/dist-types/primitives/dialog.d.ts +1 -1
  256. package/dist-types/primitives/preference-item.d.ts +1 -1
  257. package/dist-types/primitives/switch.d.ts +1 -1
  258. package/dist-types/primitives/tabs.d.ts +1 -1
  259. package/dist-types/primitives.d.ts +7 -7
  260. package/dist-types/prompt.d.ts +1 -1
  261. package/dist-types/provider.d.ts +169 -28
  262. package/dist-types/server/fetch-ssr-data.d.ts +1 -1
  263. package/dist-types/server/headers.d.ts +14 -4
  264. package/dist-types/server/index.d.ts +5 -5
  265. package/dist-types/server/normalize-url.d.ts +14 -7
  266. package/dist-types/server/types.d.ts +12 -1
  267. package/dist-types/theme-provider.d.ts +2 -2
  268. package/dist-types/transports/hosted.d.ts +36 -0
  269. package/dist-types/transports/manifest.d.ts +48 -0
  270. package/dist-types/transports/offline.d.ts +7 -16
  271. package/dist-types/types/index.d.ts +3 -3
  272. package/dist-types/types/manager.d.ts +1 -1
  273. package/dist-types/types/theme/index.d.ts +1 -1
  274. package/dist-types/ui-config-context.d.ts +14 -2
  275. package/dist-types/utils/deferred-module.d.ts +13 -0
  276. package/dist-types/utils/index.d.ts +4 -4
  277. package/dist-types/utils/merge-slot-props.d.ts +17 -3
  278. package/dist-types/utils/merge-styles.d.ts +1 -1
  279. package/dist-types/utils/theme-utils.d.ts +18 -3
  280. package/dist-types/version.d.ts +1 -1
  281. package/docs/README.md +97 -70
  282. package/docs/assets/v3/bottom-bar.png +0 -0
  283. package/docs/assets/v3/brand-card.png +0 -0
  284. package/docs/assets/v3/brand-preferences.png +0 -0
  285. package/docs/assets/v3/choice-wall.png +0 -0
  286. package/docs/assets/v3/headless-bar-html.png +0 -0
  287. package/docs/assets/v3/headless-bar-mobile.png +0 -0
  288. package/docs/assets/v3/headless-bar.png +0 -0
  289. package/docs/assets/v3/slim-bar.png +0 -0
  290. package/docs/concepts/choose-your-setup.md +141 -0
  291. package/docs/concepts/consent-categories.md +84 -0
  292. package/docs/concepts/consent-state.md +421 -0
  293. package/docs/concepts/data-fetching.md +284 -0
  294. package/docs/concepts/how-consent-works.md +123 -0
  295. package/docs/concepts/modes.md +281 -0
  296. package/docs/{frameworks/react/concepts/policy-presets.md → concepts/policies.md} +8 -60
  297. package/docs/customization/class-names.md +202 -0
  298. package/docs/customization/dark-mode.md +157 -0
  299. package/docs/customization/motion.md +128 -0
  300. package/docs/customization/overview.md +68 -33
  301. package/docs/customization/recipes.md +838 -47
  302. package/docs/customization/slots.md +217 -35
  303. package/docs/customization/stylesheets.md +248 -0
  304. package/docs/customization/tailwind.md +863 -0
  305. package/docs/customization/tokens.md +167 -36
  306. package/docs/customization/translations.md +87 -3
  307. package/docs/frameworks/react/callbacks.md +118 -0
  308. package/docs/frameworks/react/clear-on-revocation.md +106 -0
  309. package/docs/frameworks/react/components/consent-banner.md +48 -27
  310. package/docs/frameworks/react/components/consent-dialog-link.md +13 -11
  311. package/docs/frameworks/react/components/consent-dialog-trigger.md +86 -76
  312. package/docs/frameworks/react/components/consent-dialog.md +111 -58
  313. package/docs/frameworks/react/components/{frame.md → consent-gate.md} +70 -49
  314. package/docs/frameworks/react/components/consent-provider.md +143 -0
  315. package/docs/frameworks/react/components/consent-widget.md +69 -24
  316. package/docs/frameworks/react/components/dev-tools.md +76 -85
  317. package/docs/frameworks/react/components.md +113 -0
  318. package/docs/frameworks/react/compose.md +354 -0
  319. package/docs/frameworks/react/content-security-policy.md +149 -0
  320. package/docs/frameworks/react/customize.md +258 -0
  321. package/docs/frameworks/react/embeds.md +89 -0
  322. package/docs/frameworks/react/gpp.md +163 -0
  323. package/docs/frameworks/react/headless.md +4 -4
  324. package/docs/frameworks/react/hooks.md +70 -0
  325. package/docs/frameworks/react/iab.md +278 -0
  326. package/docs/frameworks/react/network-blocker.md +140 -0
  327. package/docs/frameworks/react/quickstart.md +171 -107
  328. package/docs/frameworks/react/rendering.md +285 -0
  329. package/docs/frameworks/react/scripts.md +114 -0
  330. package/docs/frameworks/react/translations.md +155 -0
  331. package/docs/frameworks/react/troubleshooting.md +189 -61
  332. package/docs/frameworks/react/upgrade-v3.md +652 -0
  333. package/docs/frameworks/react/vendor-consent.md +188 -0
  334. package/docs/guides/banner-experiments.md +688 -0
  335. package/docs/guides/troubleshooting.md +192 -54
  336. package/docs/guides/verify-consent.md +96 -49
  337. package/docs/integrations/adobe-analytics.md +177 -183
  338. package/docs/integrations/ahrefs-analytics.md +162 -178
  339. package/docs/integrations/amplitude.md +172 -180
  340. package/docs/integrations/building-integrations.md +137 -33
  341. package/docs/integrations/clearbit.md +164 -178
  342. package/docs/integrations/cloudflare-web-analytics.md +166 -180
  343. package/docs/integrations/cloudflare-zaraz.md +333 -0
  344. package/docs/integrations/crisp.md +174 -182
  345. package/docs/integrations/databuddy.md +167 -197
  346. package/docs/integrations/fathom-analytics.md +168 -180
  347. package/docs/integrations/front-chat.md +308 -0
  348. package/docs/integrations/google-maps.md +142 -108
  349. package/docs/integrations/google-tag-manager.md +258 -185
  350. package/docs/integrations/google-tag.md +226 -182
  351. package/docs/integrations/heap.md +173 -179
  352. package/docs/integrations/hightouch.md +171 -181
  353. package/docs/integrations/hotjar.md +169 -179
  354. package/docs/integrations/intercom.md +193 -177
  355. package/docs/integrations/klaviyo.md +473 -0
  356. package/docs/integrations/linkedin-insights.md +184 -174
  357. package/docs/integrations/logrocket.md +170 -180
  358. package/docs/integrations/matomo-analytics.md +198 -202
  359. package/docs/integrations/meta-pixel.md +198 -174
  360. package/docs/integrations/microsoft-clarity.md +173 -179
  361. package/docs/integrations/microsoft-uet.md +158 -178
  362. package/docs/integrations/mixpanel-analytics.md +165 -184
  363. package/docs/integrations/one-dollar-stats.md +292 -0
  364. package/docs/integrations/openai-pixel.md +214 -325
  365. package/docs/integrations/overview.md +153 -83
  366. package/docs/integrations/pinterest-tag.md +315 -0
  367. package/docs/integrations/pirsch.md +179 -183
  368. package/docs/integrations/plausible-analytics.md +182 -182
  369. package/docs/integrations/posthog.md +323 -264
  370. package/docs/integrations/promptwatch.md +164 -178
  371. package/docs/integrations/reddit-pixel.md +195 -181
  372. package/docs/integrations/rudderstack.md +211 -210
  373. package/docs/integrations/rybbit-analytics.md +181 -184
  374. package/docs/integrations/segment.md +192 -178
  375. package/docs/integrations/sentry.md +402 -0
  376. package/docs/integrations/snapchat-pixel.md +196 -180
  377. package/docs/integrations/tiktok-pixel.md +181 -174
  378. package/docs/integrations/umami-analytics.md +173 -182
  379. package/docs/integrations/vercel-analytics.md +176 -181
  380. package/docs/integrations/vercel-speed-insights.md +306 -0
  381. package/docs/integrations/x-pixel.md +186 -174
  382. package/docs/integrations/youtube.md +150 -111
  383. package/package.json +48 -17
  384. package/dist/component-hooks/use-manager.js +0 -2
  385. package/dist/components/frame/atoms.js +0 -1
  386. package/dist/components/frame/frame.js +0 -2
  387. package/dist/components/frame/index.js +0 -2
  388. package/dist/frame.js +0 -2
  389. package/dist/ui-save.js +0 -1
  390. package/dist-types/component-hooks/use-manager.d.ts +0 -40
  391. package/dist-types/components/frame/atoms.d.ts +0 -11
  392. package/dist-types/components/frame/frame.d.ts +0 -2
  393. package/dist-types/components/frame/index.d.ts +0 -24
  394. package/dist-types/frame.d.ts +0 -1
  395. package/dist-types/ui-save.d.ts +0 -5
  396. package/docs/assets/v3/brand-bar.png +0 -0
  397. package/docs/assets/v3/mobile-card.png +0 -0
  398. package/docs/assets/v3/preferences.png +0 -0
  399. package/docs/frameworks/react/components/consent-manager-provider.md +0 -71
  400. package/docs/frameworks/react/concepts/consent-categories.md +0 -33
  401. package/docs/frameworks/react/hooks/use-consent-manager/overview.md +0 -58
  402. package/docs/frameworks/react/iab/overview.md +0 -53
  403. package/docs/frameworks/react/script-loader.md +0 -63
  404. package/docs/frameworks/react/styling/overview.md +0 -217
  405. package/docs/guides/consent-state.md +0 -60
  406. package/docs/guides/data-fetching.md +0 -163
  407. package/docs/guides/deployment-modes.md +0 -63
  408. package/docs/integrations/clear-on-revocation.md +0 -167
  409. package/docs/upgrade-v3.md +0 -334
  410. package/readme.json +0 -48
  411. package/src/iab/styles.css +0 -11
  412. package/src/styles.css +0 -10
  413. /package/dist/components/{frame → consent-gate}/types.js +0 -0
@@ -0,0 +1,157 @@
1
+ ---
2
+ title: Dark mode
3
+ description: Switch c15t's banner and dialog to dark colors with colorScheme,
4
+ set your own dark tokens, follow your site's theme switch, and paint dark on
5
+ the first frame in every framework.
6
+ group: customization
7
+ ---
8
+
9
+ ## How c15t turns dark
10
+
11
+ c15t's stylesheet switches every `--c15t-*` color token to its dark value when
12
+ `<html>` has a `dark` or a `c15t-dark` class. The `colorScheme` option decides
13
+ whether c15t sets `c15t-dark` itself:
14
+
15
+ | `colorScheme` | What c15t does with `c15t-dark` |
16
+ | ------------- | ------------------------------------------------------------------------ |
17
+ | `'light'` | Removes it once |
18
+ | `'dark'` | Adds it once |
19
+ | `'system'` | Follows `prefers-color-scheme`, including changes while the page is open |
20
+ | Unset | Copies your `dark` class into `c15t-dark` and follows it as it changes |
21
+ | `null` | Leaves it alone. Your site sets it |
22
+
23
+ Astro also accepts `'none'`, which means the same as `null`.
24
+
25
+ `'light'` only removes `c15t-dark`. If your site puts `dark` on `<html>`, the
26
+ stylesheet still switches the tokens to dark. Pick one class convention for
27
+ your site and let c15t follow it.
28
+
29
+ ## Defaults in each framework
30
+
31
+ | Framework | Where to set it | Default |
32
+ | ----------------------- | --------------------------------------------------------------------------------- | -------------------- |
33
+ | Next.js, TanStack Start | `options.colorScheme` on `ConsentRoot`, and `colorScheme` on `ConsentTheme` | Unset: copies `dark` |
34
+ | React | `colorScheme` in the `ConsentProvider` options, and on `ConsentTheme` | Unset: copies `dark` |
35
+ | Nuxt | `colorScheme` under the `c15t` key in `nuxt.config.ts`, or in `app/app.config.ts` | Unset: copies `dark` |
36
+ | Vue | `colorScheme` in the `c15tVue` options | Unset: copies `dark` |
37
+ | Astro | `colorScheme` in the `c15t()` integration options | `'system'` |
38
+ | Svelte, SvelteKit | `colorScheme` on `ConsentProvider` (Svelte) or `ConsentRoot` (SvelteKit) | Unset: copies `dark` |
39
+ | HTML | `data-color-scheme` on the script tag: `light`, `dark`, `system` or `none` | `system` |
40
+ | JavaScript | `ui.colorScheme` in `init()` | `'system'` |
41
+
42
+ React, Vue and Svelte apps usually already have a theme switch that toggles a
43
+ `dark` class, such as next-themes. Copying that class keeps c15t in step with
44
+ the site without extra code.
45
+
46
+ Astro and the script tag default to `'system'` because neither can rely on a
47
+ site convention. Astro paints the banner from server HTML before any site
48
+ script runs, and Astro sites share no `dark` class convention, so following the
49
+ operating system is the one choice its inline script can make correctly. A plain
50
+ HTML page has no convention either. A site that has one opts in with `null`.
51
+
52
+ ### Set colorScheme null in Nuxt
53
+
54
+ In Nuxt, set `colorScheme: null` under the `c15t` key in `nuxt.config.ts` or
55
+ in `app/app.config.ts`. Nuxt drops a `null` in inline module options, such as
56
+ `modules: [['@c15t/vue', { colorScheme: null }]]`, before the module reads it,
57
+ so c15t would copy your `dark` class as if `colorScheme` were unset.
58
+
59
+ ## Follow your site's theme switch
60
+
61
+ In React, Next.js, TanStack Start, Vue, Nuxt, Svelte and SvelteKit, leave
62
+ `colorScheme` unset and toggle `dark` on `<html>`. c15t watches the class and switches with
63
+ it. Include the class in the server HTML when your site renders dark, so the
64
+ first paint matches.
65
+
66
+ In Astro, set `colorScheme: 'none'` and toggle `c15t-dark` together with your
67
+ own class. A `ClientRouter` navigation replaces the attributes of `<html>`, so
68
+ set the class again on `astro:after-swap` if your theme script does not.
69
+
70
+ With the script tag, add `data-color-scheme="none"`. With `init()`, pass
71
+ `ui: { colorScheme: null }`. The UI is then dark while `<html>` has `dark` or
72
+ `c15t-dark`, and follows the class as it changes. The UI renders in a shadow
73
+ root that the page's class cannot reach, so c15t copies the class onto the
74
+ shadow host.
75
+
76
+ If your site sets `c15t-dark` itself in React, Next.js, TanStack Start, Vue,
77
+ Nuxt, Svelte or SvelteKit, pass `colorScheme: null` so c15t leaves it alone.
78
+
79
+ ## Set your own dark colors
80
+
81
+ Theme tokens take a `dark` object with the same color keys as `colors`. Every
82
+ color you set in `colors` also applies in dark mode, unless `dark` sets it too,
83
+ so give a dark value for each brand color:
84
+
85
+ ```ts title="consent-theme.ts"
86
+ export const theme = {
87
+ colors: { primary: '#2f6f4e', primaryHover: '#24563c', surface: '#fbf8f3' },
88
+ dark: { primary: '#7fd1a8', primaryHover: '#9fdcbd', surface: '#1b1f1d' },
89
+ };
90
+ ```
91
+
92
+ Where the theme goes depends on the framework:
93
+
94
+ * **React, Next.js, TanStack Start.** Pass it to `ConsentTheme`. To write the
95
+ CSS outside a component, call `generateThemeCSS(theme, colorScheme)` from
96
+ `c15t/react/utils`, or `@c15t/react/utils` if you installed the scoped
97
+ package. It writes the same CSS as `ConsentTheme`.
98
+ * **Vue, Nuxt.** Pass it as `theme` in the plugin or module options. It goes
99
+ into the `<style id="c15t-css-vars">` element with `tokens`.
100
+ * **Astro.** Pass it as `theme` in the integration options.
101
+ * **SvelteKit, Svelte.** Pass it to `generateThemeCSS(theme, colorScheme)` from
102
+ `@c15t/ui/theme` on the server.
103
+ * **HTML, JavaScript.** Pass it as `ui.theme`.
104
+
105
+ This Nuxt example follows the system setting and uses its own dark primary
106
+ color. Every other dark token keeps c15t's default:
107
+
108
+ ```ts title="nuxt.config.ts (c15t options)"
109
+ // Follow the visitor's system setting, with a dark primary of our own.
110
+ colorScheme: 'system',
111
+ theme: { dark: { primary: '#7fd1a8' } },
112
+ ```
113
+
114
+ To set dark values in plain CSS instead, write them for both classes:
115
+
116
+ ```css
117
+ :root.dark,
118
+ :root.c15t-dark {
119
+ --c15t-primary: #7fd1a8;
120
+ --c15t-surface: #1b1f1d;
121
+ }
122
+ ```
123
+
124
+ A generated theme, such as the output of `ConsentTheme` or
125
+ `generateThemeCSS`, writes its dark values on `:root:root.dark` and
126
+ `:root:root.c15t-dark`. Those selectors outrank the rule above. If you use both,
127
+ put dark values in the theme, or repeat `:root` in your own selectors.
128
+
129
+ ## Paint dark on the first frame
130
+
131
+ A banner that renders light and then turns dark flashes. How to avoid that
132
+ depends on where the banner first renders:
133
+
134
+ | Framework | What to do |
135
+ | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
136
+ | Next.js, TanStack Start | Render `<ConsentTheme theme={theme} colorScheme="system" />` on the server, with the same value as `options.colorScheme`. `'dark'` writes dark tokens as the default and `'system'` adds a `prefers-color-scheme` media query, so the server HTML is dark before hydration. With `colorScheme` unset, put your `dark` class in the server HTML. |
137
+ | React | Render `<ConsentTheme colorScheme="system" />` next to the provider, with the same value as the provider's `colorScheme`. Its CSS makes the tokens dark from the first frame, before the provider sets the class. In a server-rendered React app, render it on the server. |
138
+ | Nuxt | For `'dark'` and `'system'`, the module adds an inline script to `<head>` that sets `c15t-dark` before the server-rendered banner paints. It carries the module's `nonce`. With `colorScheme` unset, put your `dark` class in the server HTML. |
139
+ | Vue | The plugin applies `colorScheme` and writes the tokens when you install it, before the first render. |
140
+ | Astro | `ConsentScript` in `<head>` sets the class from an inline script before the banner paints, and c15t sets it again after each `ClientRouter` navigation. Keep `ConsentScript` in your layout's `<head>`. |
141
+ | Svelte | The provider sets the class as it mounts. With `colorScheme` unset, the stylesheet reads your `dark` class directly, so the tokens are dark from the first frame. |
142
+ | SvelteKit | Pass the scheme to `generateThemeCSS(theme, 'system')` in your server load, so the CSS in `<svelte:head>` already has the media query. With `colorScheme` unset, put your `dark` class in the server HTML. |
143
+ | HTML, JavaScript | c15t applies the scheme when it mounts the UI, before any surface renders. |
144
+
145
+ [Theme tokens](./tokens.md) lists every color token, and your
146
+ framework's customize page shows where its theme goes.
147
+
148
+ ## Check the result
149
+
150
+ 1. Open the page in a private window with your operating system in dark mode,
151
+ or add your `dark` class to `<html>`.
152
+ 2. The banner is dark on its first frame. Reload with the Network panel
153
+ throttled to see the first paint.
154
+ 3. Open the preference dialog. It uses the same dark tokens as the banner.
155
+ 4. Switch the scheme while the page is open. With `'system'` or an unset
156
+ `colorScheme`, the banner and dialog follow without a reload.
157
+ 5. Check the contrast of the primary button text in both schemes.
@@ -0,0 +1,128 @@
1
+ ---
2
+ title: Motion and animation
3
+ description: Change how fast c15t's banner and dialog animate with duration and
4
+ easing tokens, turn animations off per surface with disableAnimation, and
5
+ check reduced-motion behavior in each framework.
6
+ group: customization
7
+ ---
8
+
9
+ ## Change the speed with motion tokens
10
+
11
+ c15t animates its surfaces with three durations and five easing curves. Set
12
+ them in the theme's `motion` object, or as CSS variables:
13
+
14
+ | CSS variable | Theme key | Default | Used by |
15
+ | ------------------------ | ------------------------ | ---------------------------------------- | -------------------------------------------------------------- |
16
+ | `--c15t-duration-fast` | `motion.duration.fast` | `80ms` | Banner fade out, buttons, tabs |
17
+ | `--c15t-duration-normal` | `motion.duration.normal` | `150ms` | Preference dialog, late banner fade in, switches, accordions |
18
+ | `--c15t-duration-slow` | `motion.duration.slow` | `200ms` | Legal links, floating trigger |
19
+ | `--c15t-easing` | `motion.easing` | `cubic-bezier(0.4, 0, 0.2, 1)` | Switches, accordions |
20
+ | `--c15t-easing-out` | `motion.easingOut` | `cubic-bezier(0.215, 0.61, 0.355, 1)` | Preference dialog, late banner fade in, floating trigger hover |
21
+ | `--c15t-easing-in` | `motion.easingIn` | `cubic-bezier(0.55, 0.055, 0.675, 0.19)` | Banner fade out |
22
+ | `--c15t-easing-in-out` | `motion.easingInOut` | `cubic-bezier(0.645, 0.045, 0.355, 1)` | Floating trigger snapping to a corner |
23
+ | `--c15t-easing-spring` | `motion.easingSpring` | `cubic-bezier(0.34, 1.56, 0.64, 1)` | The dialog's scale in |
24
+
25
+ This theme slows the dialog down and removes its overshoot:
26
+
27
+ ```ts title="consent-theme.ts"
28
+ export const theme = {
29
+ motion: {
30
+ duration: { fast: '120ms', normal: '220ms' },
31
+ easingSpring: 'cubic-bezier(0.215, 0.61, 0.355, 1)',
32
+ },
33
+ };
34
+ ```
35
+
36
+ The banner never slides in. When it shows with the page, it is part of the
37
+ first paint and appears on its first frame. When it arrives more than 100ms
38
+ after the page first painted, such as after a slow script or a client-side
39
+ init, it fades in over `--c15t-duration-normal` instead, and its root and
40
+ backdrop carry `data-entry="late"`. A banner rendered on the server always
41
+ shows at once. When it hides, Vue, Svelte and the script tag fade it out over
42
+ `--c15t-duration-fast`.
43
+
44
+ The theme goes where your framework's other tokens go. See
45
+ [theme tokens](./tokens.md) and your framework's customize page.
46
+ In Vue and Nuxt, set `tokens` with the variable name without the leading
47
+ `--`, such as `'c15t-duration-normal': '220ms'`.
48
+
49
+ ## Turn animations off
50
+
51
+ `disableAnimation` removes the banner's fades, the enter and exit
52
+ transitions of the dialogs, and the hover and snap transitions of the floating
53
+ `ConsentDialogTrigger`. Set it once for every surface, then override it for one
54
+ surface where your framework allows:
55
+
56
+ | Framework | For every surface | For one surface |
57
+ | ----------------------- | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
58
+ | Next.js, TanStack Start | `options.disableAnimation` in Next.js `c15t.config.ts`, or on `ConsentRoot` | `disableAnimation` prop on `ConsentBanner`, `ConsentDialog`, `IABConsentBanner`, `IABConsentDialog` |
59
+ | React | `disableAnimation` in the `ConsentProvider` options | The same component props |
60
+ | Nuxt | `disableAnimation` in the `c15t` module options | `disableAnimation` prop on `consent-banner.vue`, `consent-manager.vue` and the IAB banner and dialog, when you render them yourself |
61
+ | Vue | `disableAnimation` in the `c15tVue` options | The same component props |
62
+ | Astro | `disableAnimation` in the `c15t()` integration options | `disableAnimation` prop on `ConsentBanner`, `ConsentDialog`, `IABConsentBanner`, `IABConsentDialog` |
63
+ | Svelte, SvelteKit | `disableAnimation` on `ConsentProvider` (Svelte) or `ConsentRoot` (SvelteKit) | `disableAnimation` prop on `ConsentBanner`, `ConsentDialog`, `IABConsentBanner`, `IABConsentDialog` |
64
+ | HTML | `data-disable-animation` on the script tag, or `ui.disableAnimation` in `config` | `ui.banner.disableAnimation`, `ui.dialog.disableAnimation` |
65
+ | JavaScript | `ui.disableAnimation` in `init()` | `ui.banner.disableAnimation`, `ui.dialog.disableAnimation` |
66
+
67
+ A value on one surface wins over the value for every surface.
68
+
69
+ Vue's `ConsentRoot` renders the banner and dialog without props, so in Vue and
70
+ Nuxt a per-surface value only applies when you render the surface components
71
+ yourself.
72
+
73
+ ## Follow the visitor's reduced motion setting
74
+
75
+ c15t's stylesheet stops the banner, dialog, floating trigger, switches, tabs
76
+ and accordions from animating while the visitor asks for reduced motion. The
77
+ rules sit in a `prefers-reduced-motion: reduce` media query, so they apply in
78
+ every framework and follow the setting as it changes, with no option to set.
79
+
80
+ `disableAnimation: false` does not bring the animations back for these
81
+ visitors, because the stylesheet rule applies whatever the option says.
82
+
83
+ ## Animate your own rules on dialog state
84
+
85
+ The preference dialog marks its open state with `data-state`, `open` or
86
+ `closed`, so a rule can animate your own additions to it. Which element
87
+ carries the attribute depends on the framework:
88
+
89
+ | Framework | Elements with `data-state` |
90
+ | ------------------------------ | --------------------------------------------------------------------------------------------------- |
91
+ | HTML, JavaScript | Dialog overlay, positioner and content |
92
+ | Svelte, SvelteKit | Dialog backdrop, positioner and content |
93
+ | Vue, Nuxt | Dialog content and overlay. The dialog unmounts when it closes, so you only see `open` |
94
+ | React, Next.js, TanStack Start | Not on `ConsentDialog`. The `Dialog` primitive's trigger, overlay, content and close parts carry it |
95
+
96
+ Banners do not carry `data-state`. Read `data-prompt`, `data-variant` and the
97
+ other attributes in [component parts](./slots.md) instead.
98
+
99
+ ## Stop transitions while you switch themes
100
+
101
+ Every c15t stylesheet has a `c15t-no-transitions` class that sets
102
+ `transition` and `animation` to `none` on an element and its children. Add it
103
+ to `<html>` while your app swaps themes, so colors change in one frame. Force
104
+ a style and layout pass before you remove it. Otherwise the browser computes
105
+ the new theme only after the class is gone, and the change animates:
106
+
107
+ ```ts
108
+ const root = document.documentElement;
109
+ root.classList.add('c15t-no-transitions');
110
+ applyYourTheme();
111
+ // Reading layout applies the new theme while transitions are off.
112
+ root.getBoundingClientRect();
113
+ root.classList.remove('c15t-no-transitions');
114
+ ```
115
+
116
+ This assumes `applyYourTheme` changes classes or custom properties
117
+ synchronously. If your framework applies the theme in a later render, run the
118
+ last two lines after that render commits.
119
+
120
+ ## Check the result
121
+
122
+ 1. In DevTools, open the Rendering panel and emulate
123
+ `prefers-reduced-motion: reduce`. Reload with site data cleared.
124
+ 2. The banner appears without sliding in.
125
+ 3. Open the preference dialog and toggle a switch. The switch changes without
126
+ animating.
127
+ 4. Turn the emulation off, set a slower `motion.duration.normal`, and open the
128
+ dialog again. It fades in at the new speed.
@@ -1,45 +1,80 @@
1
1
  ---
2
- title: Customize your consent interface
3
- description: Choose presentation, theme tokens, slots or custom markup for the
4
- change you need.
2
+ title: Customize the interface
3
+ description: Change c15t's consent banner and dialog one step at a time, from a
4
+ prop to your own markup, and find where each step lives in your framework.
5
5
  group: customization
6
6
  ---
7
7
 
8
- ## Start with the change you want
8
+ ## Climb the ladder one step at a time
9
9
 
10
- | Change | Use | Why |
11
- | ----------------------------------------- | ----------------------------------- | ------------------------------------------------------------ |
12
- | Banner shape or location | Presentation or banner props | Keeps policy actions and built-in layout behavior |
13
- | Brand colors, radius, typography, spacing | Theme tokens | Changes related component parts together |
14
- | One card, footer, title or button group | Component slots | Targets existing markup |
15
- | Labels, descriptions or language | i18n configuration | Keeps banner and preferences copy consistent |
16
- | A different component structure | Compound components where available | Retains the component behavior while changing markup |
17
- | Your own interaction and markup | Headless APIs | You own rendering, focus behavior and policy action coverage |
10
+ Each step keeps everything the step below it gives you. Stop at the first one
11
+ that makes the change you need:
18
12
 
19
- Most brand changes need tokens and a few slots. Start there before opting out
20
- of the stock styles. The [recipes](./recipes.md) show how each
21
- choice affects a real banner.
13
+ 1. **Props and presentation.** Pick a shape, a position, button order or
14
+ blocking. c15t keeps its markup, styles and behavior.
15
+ 2. **Theme tokens.** Change colors, type, radius, spacing, shadows and motion
16
+ everywhere at once. Dark mode is a second set of tokens.
17
+ 3. **Parts and classes.** Add a class or inline style to one part of one
18
+ component, such as the banner card. Tailwind, CSS Modules and CSS-in-JS
19
+ classes go here.
20
+ 4. **Compose.** Rebuild a component from c15t's parts, in your own layout, while
21
+ c15t still renders the actions the policy requires.
22
+ 5. **Headless.** Render your own markup from c15t's state and actions. You own
23
+ the layout, focus handling and labels.
22
24
 
23
- ## Keep behavior and appearance separate
25
+ Most brand work needs tokens and a few part classes. See
26
+ [banner designs](./recipes.md) for five banners built at
27
+ different steps, with screenshots and tested code.
28
+
29
+ ## Where each step lives in your framework
30
+
31
+ | Framework | Props and presentation | Tokens | Parts and classes | Compose | Headless |
32
+ | -------------- | --------------------------------------------- | ----------------------------------------- | ----------------------------------------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
33
+ | Next.js | `ConsentBanner` props, `options.presentation` | `ConsentTheme` in a Server Component | `options.components`, `className` | [Compose](https://v3.c15t.com/docs/frameworks/next/compose) | [Headless](https://v3.c15t.com/docs/frameworks/next/headless) |
34
+ | TanStack Start | `ConsentBanner` props, `options.presentation` | `ConsentTheme` in the root route | `options.components`, `className` | [Compose](https://v3.c15t.com/docs/frameworks/tanstack-start/compose) | [Headless](https://v3.c15t.com/docs/frameworks/tanstack-start/headless) |
35
+ | React | `ConsentBanner` props, `presentation` | `ConsentTheme`, or CSS variables | `components`, `className` | [Compose](../frameworks/react/compose.md) | [Headless](../frameworks/react/headless.md) |
36
+ | Nuxt | `presentation` in `nuxt.config.ts` | `tokens` or `theme` in the module options | `components`, `class` | None | [Headless](https://v3.c15t.com/docs/frameworks/nuxt/headless) |
37
+ | Vue | `presentation` in the `c15tVue` options | `tokens` or `theme` in the plugin options | `components`, `class` | None | [Headless](https://v3.c15t.com/docs/frameworks/vue/headless) |
38
+ | Astro | `presentation` in the integration options | `theme` in the integration options | `theme.slots`, `class` on `ConsentBanner` | None | None |
39
+ | Svelte | `ConsentBanner` props, `presentation` | CSS variables, or `generateThemeCSS()` | `theme.slots`, `class` on `ConsentBanner` | [Primitives](https://v3.c15t.com/docs/frameworks/svelte/components/primitives) | [Headless](https://v3.c15t.com/docs/frameworks/svelte/headless) |
40
+ | SvelteKit | `ConsentBanner` props, `presentation` | `generateThemeCSS()` in a server load | `theme.slots`, `class` on `ConsentBanner` | [Primitives](https://v3.c15t.com/docs/frameworks/sveltekit/components/primitives) | [Headless](https://v3.c15t.com/docs/frameworks/sveltekit/headless) |
41
+ | HTML | `presentation.prompt` in `config` | `ui.theme` | `ui.theme.slots`, `::part()`, `ui.css` | None | [Headless](https://v3.c15t.com/docs/frameworks/html/headless) |
42
+ | JavaScript | `presentation.prompt` in `init()` | `ui.theme` | `ui.theme.slots`, `::part()`, `ui.css` | None | [Headless](https://v3.c15t.com/docs/frameworks/javascript/headless) |
24
43
 
25
- Presentation controls the prompt's shape, position and blocking behavior.
26
- Policy controls which actions and rights are required. Changing colors or button
27
- order does not change a saved choice or policy scope.
44
+ Configuration shapes differ between frameworks. React's
45
+ `components.banner.card`, Vue's `components.banner.card` with `class`, and the
46
+ `consentBannerCard` key in `theme.slots` target the same part through
47
+ different APIs. Check your framework's customize page before you move a
48
+ configuration from one framework to another.
49
+
50
+ ## Keep behavior and appearance separate
28
51
 
29
- A choice wall always blocks. Notices never block and cannot become a wall merely
30
- because `variant: 'wall'` was requested. Preference dialogs remain centered;
31
- prompt positioning does not move them. Required actions omitted from a custom
32
- layout can be restored by the policy renderer.
52
+ Presentation controls the prompt's shape, position and blocking. The policy
53
+ controls which actions and rights the visitor gets. Changing colors or button
54
+ order does not change a saved choice or the policy's scope.
33
55
 
34
- ## Use the adapter's configuration shape
56
+ A choice wall always blocks. A notice never blocks and does not become a wall
57
+ because you asked for `variant: 'wall'`. The preference dialog stays centered,
58
+ whatever position the banner has. If a custom layout leaves out an action the
59
+ policy requires, c15t puts it back.
35
60
 
36
- React and Next.js accept provider `theme`, `presentation` and `components`
37
- options. Vue and Nuxt expose their own shared configuration, including CSS
38
- `tokens` and component slots. Svelte accepts its provider options and theme
39
- contract. Astro serializes integration options and uses the selected adapter for
40
- dialogs. Do not move a configuration object between frameworks without checking
41
- the target types.
61
+ ## Read the rest of this section
42
62
 
43
- Read [tokens and CSS](./tokens.md),
44
- [slots](./slots.md) or
45
- [copy and translations](./translations.md) for the next step.
63
+ * [Banner designs](./recipes.md): five designs with tested code.
64
+ * [Theme tokens](./tokens.md): every `--c15t-*` variable and
65
+ its theme key.
66
+ * [Dark mode](./dark-mode.md): `colorScheme`, dark tokens and a
67
+ dark first paint.
68
+ * [Motion and animation](./motion.md): duration and easing
69
+ tokens, `disableAnimation` and reduced motion.
70
+ * [Stylesheets and CSS layers](./stylesheets.md): how c15t
71
+ loads its rules, when to import `styles.css` yourself, when the dialog's CSS
72
+ loads, and how to run without c15t's styles.
73
+ * [Component parts](./slots.md): every part, its keys in each
74
+ framework, and the `data-*` attributes to select on.
75
+ * [Class names and CSS-in-JS](./class-names.md): CSS Modules,
76
+ vanilla-extract, StyleX and Emotion on c15t's parts.
77
+ * [Tailwind CSS](./tailwind.md): Tailwind 4 and 3 in every
78
+ framework.
79
+ * [Copy and translations](./translations.md): labels,
80
+ languages and right-to-left text.