A cookie consent card with accept and decline actions. It lifts in once and lifts away on a choice.
Dependencies
Interaction Type
Choose Accept all or Decline. The card fades and lifts away, and both choices call back before closing.
Props
Options you can pass to customize this component.
title
Heading text.
description
Supporting copy.
acceptLabel
Accept button label.
declineLabel
Decline button label.
onAccept
Called when the visitor accepts.
onDecline
Called when the visitor declines.
open
Controlled open state.
defaultOpen
Initial open state. Defaults to true.
onOpenChange
Called when the card closes.
Installation
How to use
<BannerCookie onAccept={() => setConsent('all')} onDecline={() => setConsent('essential')} />
Source Code
Click the code icon in the top-right corner to view the source code.
Contact
Questions or feedback? Reach out anytime.
License & Usage
// No code loaded.
We use cookies
Cookies keep the site working and help us understand how it is used. You can change your choice at any time.