Untitled
Prefer Slots for Stock Components
There is no single top-level className contract across every pre-built consent component.
For the stock ConsentBanner, ConsentDialog, and ConsentWidget, prefer theme.slots first. That keeps the markup intact and lets you target the exact part you need.
Per-Slot className
Target individual component parts via the theme's slots object. Each slot accepts a string (className) or an object with className and style:
Combining with CSS Modules
When to Use Raw className
Use raw className-level styling when:
- your styling system is already class-driven
- tokens are too broad for the change
- slots already identify the correct element
If the request is "make the banner footer darker", prefer theme.colors.surfaceHover first. If the request is "add a border and spacing only to the footer", prefer theme.slots.consentBannerFooter.
Advanced: noStyle
Use noStyle only when you want to remove defaults and style from scratch while still keeping c15t's component structure:
You can also set noStyle per-slot:
Treat noStyle as an advanced escape hatch. Do not jump to it just because a token or slot needs debugging.
For full custom markup and behavior, continue to Headless Mode.