# Cookie consent

A cookie banner with equal Accept and Reject buttons and a panel to choose each kind. PlankUI component for React 19 and Tailwind CSS v4. Category: Blocks.

## Install

```bash
npx plankui@latest add cookie-consent
```

## Usage

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

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

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| onDecide | `(choice: { analytics, marketing }) => void` | `required` | Called once with the choice; necessary cookies are always on. |
| policyHref | `string` |  | Link to the cookie policy. |

Source: https://github.com/VectorLabsHQ/plankui/blob/main/components/ui/cookie-consent.tsx
