# Corner Consent Card

> Cookie consent card pinned to the bottom left corner with accept all, reject, and preferences actions under a privacy heading.

A shadcn/ui block from the [@7ovr](https://7ovr.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/7ovr/cookie-consent-2).

- Page, with a live preview: https://shadcn.exchange/r/7ovr/cookie-consent-2
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/7ovr/cookie-consent-2-light-70d101295fcdfe50.png
- Registry item: https://7ovr.com/r/cookie-consent-2.json
- Categories: cookie-consent
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://7ovr.com/r/cookie-consent-2.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `@base-ui/react`
- Registry items: `button`

## Files

### `registry/blocks/cookie-consent/2/cookie-consent-block.tsx`

```tsx
"use client"

import * as React from "react"
import { Button } from "@/components/ui/button"
import { IconPlaceholder } from "@/components/icons/icon-placeholder"

export default function CookieConsentBlock() {
  const [visible, setVisible] = React.useState(true)

  if (!visible) return null

  return (
    <div className="fixed bottom-4 left-4 z-50 w-full max-w-sm rounded-lg border border-border bg-background p-5 shadow-lg">
      <div className="flex items-center gap-2">
        <IconPlaceholder
          lucide="ShieldCheck"
          tabler="IconShieldCheck"
          hugeicons="Shield01Icon"
          phosphor="ShieldCheck"
          remixicon="RiShieldCheckLine"
          className="size-5 text-foreground"
          aria-hidden="true"
        />
        <h2 className="font-heading text-sm font-semibold text-foreground">
          We value your privacy
        </h2>
      </div>
      <p className="mt-2 text-sm text-muted-foreground">
        We use cookies to enhance your browsing experience and analyze our
        traffic. You can accept all, reject, or set your own preferences.
      </p>
      <div className="mt-4 flex flex-wrap items-center gap-2">
        <Button onClick={() => setVisible(false)}>Accept all</Button>
        <Button variant="outline" onClick={() => setVisible(false)}>
          Reject
        </Button>
        <Button variant="ghost" onClick={() => setVisible(false)}>
          Preferences
        </Button>
      </div>
    </div>
  )
}
```
