Componentfeedback0.83 KB gzipZero dependencies
Cookie Banner
Fixed privacy consent banner with accept and decline actions.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add cookie-bannerOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { CookieBanner } from "@/components/ui/cookie-banner"; <CookieBanner onAccept={() => console.log("Admitted")} />Source code
cookie-banner.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxcookie-banner.tsx75 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface CookieBannerProps extends React.HTMLAttributes<HTMLDivElement> { title?: string; description?: string; onAccept?: () => void; onDecline?: () => void; className?: string;} export function CookieBanner({ title = "PRIVACY & ADMISSION COOKIES", description = "We use minimal session cookies to remember your ticket stub and theme preferences.", onAccept, onDecline,Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { CookieBanner } from "@/components/ui/cookie-banner"; <CookieBanner />| Prop | Type | Description |
|---|---|---|
| title | string | Primary heading or title text. (Default: "PRIVACY & ADMISSION COOKIES") |
| description | string | Descriptive helper or subtitle text. |
| onAccept | () => void | Callback invoked on accept. |
| onDecline | () => void | Callback invoked on decline. |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |