Headless Mode
Build fully custom consent UI using only hooks - no pre-built components required.
c15t's headless mode means using the hooks (useConsentManager, useTranslations, etc.) without any pre-built UI components. This gives you complete control over the consent experience.
There are three levels of customization:
- Props - Use pre-built components with custom text and configuration
- noStyle - Use pre-built components with their structure but strip all styles
- Headless - Use only hooks and build the entire UI yourself
When to Go Headless
Go headless when:
- Your design system requires complete control over markup
- You need a consent flow that doesn't fit the banner/dialog pattern
- You want to embed consent choices inline rather than as overlays
Use noStyle instead when:
- The component structure works but the styling doesn't
- You want to apply your own CSS/Tailwind without fighting defaults
Full Example: Custom Consent Banner
Usage with Provider
The headless UI still needs a ConsentManagerProvider:
Custom Dialog
Build a custom consent dialog for detailed category management: