Cookie consent bar with category switchesbanner-cookie-consent
Use in Plus UI
npx shadcn@latest add https://blocks.plusui.com/r/banner-cookie-consent.jsonBanner · 3 variants
← → to step through · + on a thumbnail to compare side by side (up to 3)
/preview/banner-cookie-consent
Open ↗Default content
{
"message": "We use essential cookies to run the site. With your OK, we also measure visits and remember your settings.",
"link": {
"label": "Read the cookie policy",
"href": "#"
},
"consent": {
"title": "Your cookie choices",
"acceptLabel": "Accept all",
"rejectLabel": "Reject non-essential",
"customizeLabel": "Customize",
"saveLabel": "Save my choices",
"categoriesTitle": "Choose what we may store",
"requiredLabel": "Always on",
"categories": [
{
"id": "essential",
"name": "Essential",
"description": "Sign-in, security and load balancing. The site can't work without these.",
"required": true
},
{
"id": "preferences",
"name": "Preferences",
"description": "Remember your theme, region and the docs version you last read."
},
{
"id": "analytics",
"name": "Analytics",
"description": "Count visits and see which pages help, aggregated and kept for 13 months. No ad networks."
},
{
"id": "marketing",
"name": "Marketing",
"description": "Tell us which campaign brought you here, so we stop paying for ones that don't."
}
],
"saved": {
"message": "Your cookie choices are saved.",
"changeLabel": "Change choices"
}
}
}