Components

CookieConsent

marketing

GDPR-compliant cookie consent banner with granular preferences and automatic analytics integration. Shows on first visit, persists choices to localStorage, and blocks tracking until consent is given.

@launch/marketing-ui

Live Preview

Info

Cookie Consent Banner

GDPR-compliant cookie consent that automatically appears on first visit and manages user preferences

Note: The actual CookieConsent component manages its own state internally and appears automatically on first visit. The examples below show static previews of different banner styles.

Basic Cookie Banner

We use cookies to improve your experience. By continuing to use this site, you accept our use of cookies.

Features

Persistent Storage

User preferences are saved in localStorage and persist across sessions.

GDPR Compliant

Follows GDPR guidelines with explicit consent before setting non-essential cookies.

Customizable

Fully customizable text, styling, and behavior through props.

Analytics Integration

Automatically integrates with AnalyticsWrapper for consent-based tracking.

Usage Guidance

✓ When to Use

Required for every marketing site to comply with GDPR, CCPA, and privacy regulations. Use in root layout to display consent banner before any tracking occurs. Essential for sites using analytics, advertising, or marketing cookies.

✗ When NOT to Use

Not needed for internal tools without external tracking, apps that don't use cookies, or backend services. Skip for development/staging environments where real users won't visit.

Props

privacyPolicyUrldebugclassNamestylechildrenonClickonChange

Tags

gdpr
cookies
consent
privacy
compliance
analytics
required
legal