Why does Astro Consent exist?
To provide a fast, deterministic cookie consent solution without tracking, vendor lock-in, or runtime dependencies.
Clear answers explaining how Astro Consent delivers privacy-first cookie consent for Astro sites.
Last Updated: 01 April 2026
To provide a fast, deterministic cookie consent solution without tracking, vendor lock-in, or runtime dependencies.
The integration is applied at build time. Only minimal client-side logic runs to store and read consent.
Essential, analytics, and marketing. Scripts outside essential must be conditionally loaded.
All styling is controlled via CSS variables in a generated stylesheet that you fully own.
Yes. A small global API allows reading, setting, and resetting consent state.
Yes. Running `npx astro-consent remove` cleanly removes all integration code and generated files.
No. Consent is stored locally in the browser using localStorage with a configurable TTL.
Yes. Astro Consent is fully open source and released under the MIT license.
Ready to add privacy-first consent to your Astro site?