Cookie Consent ComponentDemo
Click the buttons below to preview different variants of the cookie consent banner. The banner will appear at the bottom of the screen.
InstallationCLI
Install the cookie consent component using the shadcn CLI
npx shadcn@latest add http://shadcn-cookies.vercel.app/r/cookie-consent.json
This will add the cookie consent component to your project with all necessary dependencies.
Usage
<CookieConsent variant="default" onAcceptCallback={() => console.log('Accepted')} onDeclineCallback={() => console.log('Declined')}/>
Select a variant above to see the cookie consent banner in action.