bottom consent bar that hides once dismissed.

Live preview

Install

From your site folder, run:

jprot add CookieBanner

That downloads the self-contained component into theme/components/CookieBanner.js,

where it is picked up automatically — the same way as any built-in component.

To remove it later, just delete that file.

Use it as a homepage section

Add an entry to the sections: list in jprot.config.js:

sections: [
  { component: 'CookieBanner', title: 'CookieBanner' },
]

Use it inside a page

On its own line in any Markdown file, passing the props:

:::CookieBanner title="Cookies" text="We only store the settings you pick." accept="Got it" decline="No thanks" mode="inline"

Props

PropTypeNote
titlestringsmall label
textstringmessage
acceptstringaccept button
declinestringdecline link
modestring"pinned" floats at the bottom of the viewport (default) \"inline" renders statically, always visible

↩ Back to all elements