Installation
- Copy the generated code using the Copy Code button
- Paste the
<style> section into your HTML's <head>
- Paste the
<script> section just before </body>
That's it! The banner will automatically appear when visitors land on your site and haven't made a choice yet.
For npm users
- Install:
npm install smallest-cookie-banner
- Import:
import { createCookieBanner } from 'smallest-cookie-banner'
- Initialize:
createCookieBanner(config).show()
GDPR Mode
For full GDPR compliance with granular consent categories, set Banner Mode to "GDPR" in the Behavior section. This shows users checkboxes for each cookie type (Essential, Analytics, Marketing, Functional).
Documentation
View full documentation on GitHub →