<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
Prop | Type | Description |
---|---|---|
config | ConsentManagerConfig | Configuration object for Consent Manager. |
store | ConsentManagerStore | Storage mechanism for consent decisions. |
fallbackComponent | React.FC<FallbackComponentProps> | Optional. Custom fallback component for unconsented integrations. |
children | React.ReactNode | The application's components. |
Example Usage
import { ConsentManager } from '@consent-manager/core'
const App = () => (
<ConsentManager config={myConfig} store={myStore}>
{/* Rest of your application */}
</ConsentManager>
)