Cookie Consent
ProInstallation
ProRequires a Planes Pro license.
npx shadcn add @useplanes/cookie-consent
Works once the @useplanes registry is set up in your project (one-time). After that, copy and run commands directly.
Unlock with Planes Pro
$99 once · 142 Pro components · lifetime updates.
import { CookieConsent } from "@/components/ui/CookieConsent";
<CookieConsent
variant="card"
onConsent={(choice) => {
if (choice.analytics) loadAnalytics();
}}
/>Use cases
GDPR consent
Reject and accept carry equal weight, with per-category toggles in place.
Brand moment
Turn a mandatory banner into a small delight visitors remember.
Low-noise sites
The pill variant keeps consent one tap away without covering content.
Gating analytics
Only load trackers after onConsent reports analytics: true.