Velohost Velohost

Astro Integration

Astro Consent

A privacy-first, zero-dependency cookie consent banner for Astro — built for speed, compliance, and total visual control.

Usage snapshot

692
Downloads in the last 30 days
Latest npm version · v1.0.14
Source: npm registry

Why this plugin exists

Most cookie consent solutions are bloated, opaque, or tied to third-party services.

Astro Consent is built differently: no trackers, no remote calls, no analytics SDKs, and no vendor lock-in.

It provides a deterministic, developer-controlled consent layer that respects user privacy and legal boundaries.

What it delivers

Design principles

  • Privacy-first by design
  • Zero runtime dependencies
  • Build-time integration
  • Frontend-controlled script loading
  • Full CSS-based theming
  • Clean install and clean removal

What this plugin does

  • GDPR / UK GDPR friendly consent model
  • Essential, analytics, and marketing categories
  • Preferences modal with toggle switches
  • Zero runtime JavaScript dependencies
  • Fully themeable via CSS variables
  • CLI installer and remover
  • Clean uninstall with no residue
  • Framework-agnostic frontend API

Installation

npm install astro-consent

After installation, run `npx astro-consent` to inject the integration and generate the CSS file automatically.

Project links

Source code, releases, documentation, and contribution guidelines.

Want the deep dive?

Read the FAQs for implementation details, design rationale, and integration guidance.

View plugin FAQs