Arunachalam

Cookie Banner

Buttons 132

About

The CookiePanel is a compact, bottom‑right floating cookie consent banner built with Next.js, TypeScript, TailwindCSS v4, and Lucide icons. It presents users with a clear cookie policy message, quick Accept all and Customize actions, and theme‑aware styling. Clicking Customize smoothly expands an inline preferences panel inside the toast, letting users toggle cookie categories without leaving the page. Preferences are saved to localStorage and the banner closes automatically upon saving, ensuring a clean, interruption‑free user experience. Built‑in slide/fade animations are handled purely with Tailwind’s tw-animate-css utilities for a lightweight, modern feel.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Cookie Banner to your project and fits it to your theme.

Code

How Cookie Banner is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { CookiePanel } from "@/components/ui/cookie-banner-1";

export default function DemoCookiePanel() {
  return (
    <main className="min-h-screen grid place-items-center bg-background text-foreground p-8">
      <div className="m-auto max-w-xl text-center">
        <h1 className="text-2xl font-semibold mb-2">Cookie Panel — Toast with Preferences</h1>

        <p className="text-muted-foreground mb-8">
          This demo shows the compact, bottom‑right floating cookie banner. 
          Click <strong>Customize</strong> to expand and adjust your cookie preferences inline — no modal needed.
        </p>
      </div>

      <CookiePanel />
    </main>
  );
}

Dependencies

More by Arunachalam

View all
  • Scroll media expansion hero

    Scroll media expansion hero

    10.6K
  • Profile Card Testimonial Carousel

    Profile Card Testimonial Carousel

    1.2K
  • Modern Animated Sign In

    Modern Animated Sign In

    1.1K
  • Bottom Nav Bar

    Bottom Nav Bar

    801
  • Toast

    Toast

    659
  • Adaptive Notch Navigation Bar

    Adaptive Notch Navigation Bar

    656
  • Connected Carousel

    Connected Carousel

    378
  • Animated File Tree

    Animated File Tree

    336

More in Buttons

View all
  • Button

    Button

    14
  • Texture Button

    Texture Button

    92
  • Button

    Button

    34
  • Button Save

    Button Save

    46
  • Button

    Button

    64
  • Button

    Button

  • Notification Button

    Notification Button

    103
  • App Store Button

    App Store Button

    453