Components › Blocks

Cookie consent

A cookie banner with equal Accept and Reject buttons and a panel to choose each kind.

Installation

npx plankui@latest add cookie-consent

Usage

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

<CookieConsent policyHref="/cookies" onDecide={(choice) => save(choice)} />

API reference

PropTypeDefaultDescription
onDecide(choice: { analytics, marketing }) => voidrequiredCalled once with the choice; necessary cookies are always on.
policyHrefstringLink to the cookie policy.

View the source on GitHub