Nigeria NDPA 2023 · MIT licensed · Open source
Cookie Consent Banner for Nigerian Websites — NDPA 2023 Compliant
A drop-in React cookie consent banner built for the Nigeria Data Protection Act 2023. Granular categories, audit log, easy withdrawal, version-bump re-prompt, and pluggable storage adapters for any backend. Free and open source.
Why a Nigeria-specific cookie consent banner?
Generic GDPR cookie banners do not satisfy Section 26 of the Nigeria Data Protection Act 2023, which requires consent to be specific, informed, freely given, and affirmative — with the right to withdraw at any time made as easy as the act of giving consent. The NDPR Toolkit cookie banner is built against the gazetted Act and the 2025 General Application and Implementation Directive (GAID), with audit-friendly defaults Nigerian DPOs can sign off on.
What you get
- Granular consent categories — necessary (always on), analytics, marketing, advertising, functional, with human-readable purpose descriptions for every category.
- Section 26 withdrawal — one-click access to a consent management dialog from any page; revoke specific categories without losing necessary cookies.
- Version-bump re-prompt — bump the consent version when your purposes change and every prior visitor gets re-asked. No stale consent.
- Audit log — every accept / reject / update is recorded with timestamp and version, satisfying NDPC record-keeping requirements.
- Storage adapters — localStorage, sessionStorage, cookie, API, or a custom backend via
StorageAdapter. Bring your own Prisma / Drizzle / Firestore / Supabase. - RSC-safe — ships
"use client"banners correctly so you can drop it into Next.js App Router without manual wrappers. - Multilingual — English (Nigeria), Yorùbá, Igbo, Hausa, and Pidgin locales out of the box; custom locales via a typed
mergeLocalehelper. - Accessible — WCAG 2.1 AA, full keyboard navigation, focus trap that restores focus on close,
prefers-reduced-motionrespected.
30-second install
pnpm add @tantainnovative/ndpr-toolkitThen drop the preset into your Next.js layout:
// app/layout.tsx
import { NDPRConsent } from '@tantainnovative/ndpr-toolkit/presets';
import '@tantainnovative/ndpr-toolkit/styles';
export default function RootLayout({ children }) {
return (
<html lang="en-NG">
<body>
{children}
<NDPRConsent />
</body>
</html>
);
}That's it — the banner appears on first visit, the preferences icon stays accessible site-wide, and every event is persisted to localStorage by default. For server-side persistence (recommended for fintech and health-tech), pass an apiAdapter and wire it to your existing user model.
Built for Nigerian apps
NDPR Toolkit is used by Nigerian fintech, insurtech, healthcare, and SaaS teams to satisfy the NDPC's compliance notices issued to licensed banks, insurance brokers, gaming operators, and pension funds. It is not legal advice — we recommend you have your DPO review the deployed consent surface — but it ships every piece of the consent stack the NDPC asks about during an audit, with the section references baked into the API.
Not sure if your consent flow already passes?
Take the free 5-minute NDPA audit. It scores your consent banner, DSR portal, breach process, and 5 other modules against the gazetted Act and gives you prioritised fixes.
Run the free NDPA audit →