BlocksUncategorizedCookie 01

Cookie 01

About this block

Cookie 01 is a floating cookie-consent card fixed to a corner of the viewport, with an accept button and a learn-more link to your privacy policy. Built with shadcn/ui Button and Card components, it renders on top of page content without blocking interaction elsewhere on the page.

When to use it

  • Any site serving EU or UK visitors where GDPR/ePrivacy cookie consent is required
  • Products that set analytics or marketing cookies and need a visible opt-in before doing so
  • Sites that want a lightweight, non-blocking consent pattern instead of a full-page modal
  • Projects where the consent choice needs to persist across page loads

Notes

The component doesn't persist the accept choice by itself — store it in localStorage or a cookie after the accept handler fires, and check that value before rendering the card again.

Frequently asked questions

Does Cookie 01 block cookies until the user accepts?
No, it's a UI-only consent prompt — you still need to gate your analytics/marketing scripts behind the accept event yourself for actual compliance.
Does it remember the user's choice after they accept?
Not by default. Persist the choice in localStorage or a cookie in the accept handler, and check that value before rendering the card on future page loads.
Can I link it to my own privacy policy page?
Yes, the learn-more link URL is a prop — point it at your /legal or /privacy page.
Shadcn/ui components
buttoncard
Connected toStatic — no backend wired