Component packs › Beacon › Cookie Banner

Cookie Banner

Decline and the cookie cracks and crumbles; accept and it takes a bite. Settings has real switches and both choices are equally easy.

Cookie Banner is a cookie consent from Beacon, a component pack with 8 components: Product tour, onboarding and feedback components that guide without nagging. Price: $2 for the whole pack.

Built with: crumb physics, real switches, onChoice.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Cookie Banner props

PropTypeDefaultDescription
onChoice(choice: CookieChoice) => void
policyHrefstringLink to your cookie policy.
theme'dark' | 'light'
autoplaybooleanShowcase mode: declines, accepts and opens settings in turn until touched.

Methods on the ref

Use it in React

import CookieBanner from './CookieBanner';

<CookieBanner />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Beacon

Good for: Onboarding and product tours.