Kinetic UI
Back to Introduction
General

Cookie Consent

A GDPR/CCPA-compliant banner with premium animations and glassmorphism.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add cookie-consent
cookie-consent

GDPR Compliance

A premium cookie consent banner that doesn't ruin your site's aesthetic.

Overview

Every professional website needs a cookie consent banner for GDPR and CCPA compliance. However, most default plugins are incredibly ugly and instantly ruin the premium aesthetic you've worked so hard to build.

This CookieConsent component solves that. It provides a sleek, animated, glassmorphism UI that looks intentional and high-end. It supports both a full-width bottom-bar and a modern floating corner modal.

Usage

Place this in your main layout so it tracks across pages.

import { CookieConsent } from "@/components/creative/cookie-consent"

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        {children}
        
        <CookieConsent 
          variant="modal" 
          delay={1500}
          onAcceptAll={() => {
            // Initialize analytics here
          }}
        />
      </body>
    </html>
  )
}

Usage Guide

1. Import the Component

Import the component into your React or Next.js page:

import { CookieConsent } from "@/components/creative/cookie-consent";

2. Implementation Example

Render the component and customize its behavior by passing props:

import { CookieConsent } from "@/components/creative/cookie-consent";

export default function Example() {
  return (
    <div className="w-full flex items-center justify-center p-8">
      <CookieConsent
        onAcceptAll{/* value */}
        onRejectAll{/* value */}
        onCustomize{/* value */}
      />
    </div>
  );
}
Performance Notes
  • Uses CSS hardware acceleration via GPU transform-binds.
  • Damped interpolation minimizes paint-redraw flashes.
  • Tree-shakable import: only compiles elements requested.
Accessibility Notes
  • Full keyboard focus-ring navigation support (`Tab`/`Shift+Tab`).
  • ARIA roles mapped correctly for assistive screen readers.
  • Respects `prefers-reduced-motion` system toggles.