mayicookies
Cookie consent for developers
Use the hosted loader or @supaapps/mayicookies. Follow HTML, JavaScript, React, Next.js, and Nuxt installation guides.
Home / Cookie consent for developersOne runtime, two ways to ship it. Add a hosted script to an existing site, or bundle the npm package with your app.
- Keep consent defaults in the document head, not in a late React effect.
- Use the preferences API and category-based scripts without rebuilding a consent UI.
- Check the result in a clean browser, including delayed runtime loading.
Start with the right guide
Install in your code
Install the hosted script in HTML
For server-rendered sites and pages where you can edit the document head.
Install in your codeInstall in React and Vite
Initialize the runtime at the React root and keep consent defaults in index.html.
Install in your codeInstall in Next.js App Router
A root layout for early defaults and a client component for the consent runtime.
Install in your codeInstall in Nuxt
Use a client-only plugin and emit early consent from the document head.