{"_id":"@armondschneider/cookiekit","_rev":"2-cd4e8d532c48adc6f735226e716bfa20","name":"@armondschneider/cookiekit","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@armondschneider/cookiekit","version":"0.1.0","license":"MIT","_id":"@armondschneider/cookiekit@0.1.0","maintainers":[{"name":"armondschneider","email":"mondoloves@icloud.com"}],"dist":{"shasum":"cc81eb2e3a4a98b05a225f829f562445d7ab01ba","tarball":"https://registry.npmjs.org/@armondschneider/cookiekit/-/cookiekit-0.1.0.tgz","fileCount":18,"integrity":"sha512-Q8fXaNK6m49ck503Md85zGcSe8DxUxFSP4Tja3hdl3i6klyC/5/mhvbtWHz0gz/FENmU2zGxuXP/UlVf+v9C6Q==","signatures":[{"sig":"MEYCIQD4hbOUXgJIWsOYVx14oLv9ten8CiSlMHA/dgN0GJ/u/wIhAP2cQLPIUSUVkOj1DRiOCHVYZ+JGhGYl2wSFgMi829x9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":62865},"type":"module","exports":{".":{"types":"./components/cookiekit/index.ts","default":"./components/cookiekit/index.ts"}},"gitHead":"36bab9bdf6fd62c24e26813709084afa55fe293a","scripts":{"dev":"next dev","lint":"eslint .","test":"vitest run","build":"next build","start":"next start","format":"prettier --write .","test:watch":"vitest","format:check":"prettier --check ."},"_npmUser":{"name":"armondschneider","email":"mondoloves@icloud.com"},"_npmVersion":"11.12.1","description":"Beautiful, accessible cookie consent components for React — the shadcn/ui of cookie consent.","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{"clsx":"^2.1.1","next":"16.2.10","react":"19.2.4","react-dom":"19.2.4","next-themes":"^0.4.6","lucide-react":"^1.24.0","framer-motion":"^12.42.2","tailwind-merge":"^3.6.0","@radix-ui/react-slot":"^1.3.0","@radix-ui/react-dialog":"^1.1.19","@radix-ui/react-switch":"^1.3.3","class-variance-authority":"^0.7.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^29.1.1","eslint":"^9","vitest":"^4.1.10","prettier":"^3.9.5","typescript":"^5","@types/node":"^20","tailwindcss":"^4","@types/react":"^19","@types/react-dom":"^19","eslint-config-next":"16.2.10","@tailwindcss/postcss":"^4","@vitejs/plugin-react":"^6.0.3","@testing-library/react":"^16.3.2","eslint-config-prettier":"^10.1.8","@testing-library/jest-dom":"^6.9.1","@testing-library/user-event":"^14.6.1"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cookiekit_0.1.0_1784658783827_0.9495369527428597","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2026-07-21T18:33:03.671Z","modified":"2026-07-21T20:12:01.310Z","0.1.0":"2026-07-21T18:33:03.961Z"},"license":"MIT","description":"Beautiful, accessible cookie consent components for React — the shadcn/ui of cookie consent.","maintainers":[{"name":"armondschneider","email":"mondoloves@icloud.com"}],"readme":"# CookieKit\n\n**Cookie consent components you'll actually want on your website.**\n\nBeautiful, accessible, and fully editable cookie consent for modern React applications. CookieKit is the [shadcn/ui](https://ui.shadcn.com) of cookie consent — you own the code. No iframes, no third-party widgets, no backend, no vendor lock-in.\n\n## Features\n\n- Cookie banner with Accept / Decline / Settings\n- Cookie settings modal (Necessary, Preferences, Analytics, Marketing)\n- Floating settings button\n- `ConsentGate` for conditional rendering\n- `useCookieConsent` and `useConsentCategory` hooks\n- localStorage persistence with versioning and expiration\n- Light & dark mode via CSS variables\n- Accessible (keyboard, focus trap, reduced motion)\n- TypeScript-first, SSR-safe, zero backend\n\n## Quick start\n\n```bash\npnpm install\npnpm dev\n```\n\n```tsx\nimport {\n  CookieKitProvider,\n  CookieBanner,\n  CookieSettings,\n  CookieSettingsButton,\n} from \"@armondschneider/cookiekit\";\n\nexport default function RootLayout({ children }) {\n  return (\n    <CookieKitProvider>\n      {children}\n      <CookieBanner />\n      <CookieSettings />\n      <CookieSettingsButton />\n    </CookieKitProvider>\n  );\n}\n```\n\n## API\n\n```tsx\nconst {\n  consent,\n  hasConsent,\n  acceptAll,\n  declineAll,\n  updatePreferences,\n  resetConsent,\n  openSettings,\n  closeSettings,\n  isAllowed,\n} = useCookieConsent();\n\nconst analyticsEnabled = useConsentCategory(\"analytics\");\n\n<ConsentGate category=\"analytics\">\n  <Analytics />\n</ConsentGate>;\n```\n\n## Scripts\n\n| Command        | Description              |\n| -------------- | ------------------------ |\n| `pnpm dev`     | Start Next.js dev server |\n| `pnpm build`   | Production build         |\n| `pnpm test`    | Run Vitest suite         |\n| `pnpm lint`    | ESLint                   |\n| `pnpm format`  | Prettier                 |\n\n## Project structure\n\n```\napp/                 # Marketing site + docs\ncomponents/\n  cookiekit/         # Library components (banner, settings, provider…)\n  ui/                # Shared primitives (button, dialog, switch)\n  site/              # Landing & docs chrome\nhooks/               # useCookieConsent, useConsentCategory\nlib/                 # storage + utils\ntypes/               # Consent types\nregistry/            # Reserved for future CLI\n```\n\n## Future CLI\n\n```bash\nnpx cookiekit add banner\nnpx cookiekit add settings\nnpx cookiekit add provider\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}