1.3.0 • Published 6 months ago

@c15t/nextjs v1.3.0

Weekly downloads
-
License
GPL-3.0-only
Repository
-
Last release
6 months ago

@c15t/nextjs

Next.js integration for C15T consent management. This package combines @c15t/node-sdk, @c15t/react, and @c15t/middleware into a single, easy-to-use package for Next.js applications.

Installation

npm install @c15t/nextjs
# or
yarn add @c15t/nextjs
# or
pnpm add @c15t/nextjs

Features

  • 🔄 Automatic middleware integration
  • 🎯 Type-safe API client
  • 🎨 Pre-built React components
  • 🔒 Secure consent management
  • 📱 Responsive design
  • 🌐 Server-side rendering support

API Reference

Components

  • C15TNextProvider: Provider component for the consent management system
  • ConsentBanner: Pre-built consent banner component
  • ConsentManager: Component for managing consent preferences
  • ConsentButton: Button component for triggering consent dialogs

Hooks

  • useConsent: Hook for accessing consent state and methods
  • useConsentPreferences: Hook for managing consent preferences
  • useConsentBanner: Hook for controlling the consent banner

Utilities

  • withC15T: Higher-order function for configuring Next.js
  • createConsentClient: Function for creating a consent client instance

Support

License

GNU General Public License v3.0