Arunachalam

Cookie Banner

Buttons 153

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

    11.5K
  • Profile Card Testimonial Carousel

    Profile Card Testimonial Carousel

    1.4K
  • Modern Animated Sign In

    Modern Animated Sign In

    1.2K
  • Bottom Nav Bar

    Bottom Nav Bar

    998
  • Adaptive Notch Navigation Bar

    Adaptive Notch Navigation Bar

    800
  • Toast

    Toast

    681
  • Connected Carousel

    Connected Carousel

    601
  • Animated File Tree

    Animated File Tree

    372

More in Buttons

View all
  • Button

    Button

    169
  • Texture Button

    Texture Button

    122
  • HeroUI Button Group

    HeroUI Button Group

    1
  • Button

    Button

    88
  • Native Button

    Native Button

    7
  • Button

    Button

    74
  • Button Group

    Button Group

    1
  • Button Group

    Button Group

    5