Skip to main content

<ConsentManagerDefaultInterface />

ConsentManagerDefaultInterface is a React component that acts as a wrapper for your application, providing a default user interface for managing consent. It supports all properties passed to the core ConsentManager component.

Props

In addition to all the props supported by ConsentManager, ConsentManagerDefaultInterface also accepts:

PropTypeDescription
messagesMessagesCustom messages for localization and text customization.
childrenReact.ReactNodeThe application's components to be rendered within the manager.
configConsentManagerConfigConfiguration object for Consent Manager.
styles, animationStylesStylesCustom styling for the interface.
ToggleButton, ToggleIconReact.FC<ToggleButtonProps>,
React.FC<IconProps>
Components for toggle buttons and icons.
CloseIconReact.FC<IconProps>Component for the close icon.
SwitchReact.FC<SwitchProps>Component for the switch control.
ButtonReact.FC<ButtonProps>Component for buttons.
FormReact.FC<ConsentFormProps> Component for the consent form.
useDefaultButtonForIntroductionbooleanDetermines if the default button style is used for the introduction screen.
slideDurationnumberDuration of slide animations in milliseconds.
noActionDelaynumberDelay before any action is taken (e.g., showing the form) in milliseconds.

Example Usage

import { ConsentManagerDefaultInterface } from '@consent-manager/interface-default'

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