Skip to Content
🎉 Coral x Panda has been released 🎉 Read the Migration Guide
DocumentationOrganismsCookiePreferencesComponentsCookieBanner

CookieBanner

CookieBanner is a sub-component of the CookiePreferences organism.

Basic Usage

import { CookiePreferences, CookieBanner } from '@krakentech/coral-organisms'; <CookiePreferences> <CookieBanner onAcceptEverything={() => console.log('Accepted all cookies')} onRejectEverything={() => console.log('Rejected all cookies')} /> ... </CookiePreferences>

Full API

NameTypeDefault
allowAllButtonLabelstring
configureButtonLabelstring
rejectButtonLabelstring
onAcceptEverythingVoidFunction

A callback for when the user chooses the main option on the CookieBanner to accept all cookies.

onRejectEverythingVoidFunction

A callback for when the user chooses the reject option on the CookieBanner to reject all cookies.

Last updated on