Loading...
Loading...
> GDPR/Privacy compliance banner with granular consent preferences.
1import { CookieConsent } from "@/components/ui/cookie-consent"
> We use cookies for analytics. Privacy
1<CookieConsent2 onAccept={(preferences) => saveCookiePreferences(preferences)}3 privacyPolicyUrl="/privacy"4/>
> We use cookies for analytics. Privacy
1<CookieConsent />
> We use cookies for analytics. Privacy
1<CookieConsent2 onAccept={(prefs) => saveCookiePreferences(prefs)}3 onReject={() => clearNonEssentialCookies()}4 privacyPolicyUrl="/privacy"5 cookiePolicyUrl="/cookies"6/>
| Prop | Type | Default | Description |
|---|---|---|---|
| onAccept | (preferences: CookiePreferences) => void | - | Called when user accepts cookies with their preferences. |
| onReject | () => void | - | Called when user rejects all non-essential cookies. |
| privacyPolicyUrl | string | "/privacy" | URL to privacy policy page. |
| cookiePolicyUrl | string | "/cookies" | URL to cookie policy page. |
| className | string | - | Additional CSS classes. |
[NECESSARY]
Essential cookies required for the website to function. Always enabled.
[ANALYTICS]
Help understand how visitors interact with the website.
[MARKETING]
Track visitors across websites for relevant ads.
[PREFERENCES]
Remember settings like theme, language, and region.