Skip to main content

<ConsentManager />

ConsentManager is the core component that provides context and state management for all consent-related functionality. It should wrap the root of your application.

The actual layout is provided by the Form Component, while the Default Interface is implementing this component on its own, you dont need to set it up when you use the default interface.

Props

PropTypeDescription
configConsentManagerConfigConfiguration object for Consent Manager.
storeConsentManagerStoreStorage mechanism for consent decisions.
fallbackComponentReact.FC<FallbackComponentProps>Optional. Custom fallback component for unconsented integrations.
childrenReact.ReactNodeThe application's components.

Example Usage

import { ConsentManager } from '@consent-manager/core'

const App = () => (
<ConsentManager config={myConfig} store={myStore}>
{/* Rest of your application */}
</ConsentManager>
)