It is the most hated thing on the web, so I decided to tackle it head-on with my own battle-tested cookie consent banner.

I wanted the ability to include a banner on my sites just with an init script and cdn, so I built smallest-cookie-banner, a ~7KB gzipped, zero-dependency, privacy-first, framework-agnostic cookie consent banner that works with React, Vue, Angular, Svelte, or plain JS. It can be bundled with your app or loaded via CDN.

It is setup with work with multiple languages, and compliant with GDPR, CCPA, and LGPD. EU users get explicit Accept and Reject. Everywhere else uses implied consent. No external requests, no tracking, and fully customizable.

Demo and configurator: https://dreadfulcode.github.io/smallest-cookie-banner/

Repo: https://github.com/DreadfulCode/smallest-cookie-banner