All Projects → Palmabit-IT → react-cookie-law

Palmabit-IT / react-cookie-law

Licence: other
React Cookie Law is a cookie-info banner compliance with the GDPR and the EU cookie law. It allows the user to give consent in a granular way.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-cookie-law

cookie-consent
Cookie consent with accessible dialog, agnostic tag triggers and conditional content, script and embed hooks.
Stars: ✭ 55 (-46.6%)
Mutual labels:  cookie-consent, gdpr, cookie-banner, gdpr-consent
PolishCookieConsent
Polish Cookie Consent is an extension, which automatically accepts privacy policy/GDPR on websites.
Stars: ✭ 17 (-83.5%)
Mutual labels:  cookie, cookie-consent, gdpr, gdpr-consent
silverstripe-cookie-consent
GDPR compliant cookie popup and consent checker
Stars: ✭ 16 (-84.47%)
Mutual labels:  cookie, gdpr, gdpr-cookie, gdpr-consent
cookie-consent-js
A simple dialog and framework to handle the German and EU law about cookies in a website (December 2021)
Stars: ✭ 55 (-46.6%)
Mutual labels:  cookie-consent, gdpr, gdpr-cookie
bootstrap-cookie-consent-settings
A modal dialog (cookie banner) and framework to handle the German and EU law about cookies in a website. Needs Bootstrap.
Stars: ✭ 25 (-75.73%)
Mutual labels:  cookie-consent, gdpr, gdpr-cookie
gdpr-cookie-monster
A minimal EU-GDPR compliant cookie consent banner for websites and shops (5.6K gzipped).
Stars: ✭ 27 (-73.79%)
Mutual labels:  cookie-consent, gdpr, cookie-banner
Cookieconsent
A free solution to the EU, GDPR, and California Cookie Laws
Stars: ✭ 3,017 (+2829.13%)
Mutual labels:  cookie-consent, gdpr
javascript-cookie-control
Javascript module for controling cookie consent on your website
Stars: ✭ 18 (-82.52%)
Mutual labels:  cookie, gdpr
gdpr-cookie
Php Cookie checker for Analytics and Tawk.To (GDPR Compliance)
Stars: ✭ 21 (-79.61%)
Mutual labels:  cookie, gdpr
iabtcf-es
Official compliant tool suite for implementing the Transparency and Consent Framework (TCF) v2.0. The essential toolkit for CMPs.
Stars: ✭ 102 (-0.97%)
Mutual labels:  gdpr, gdpr-consent
Cookies Eu Banner
1kb vanilla JS script which manages cookies consent banner display like asked by GDPR
Stars: ✭ 326 (+216.5%)
Mutual labels:  cookie, gdpr
magento2-module-cookie-consent
Magento 2 wrapper for Cookie Consent by Insites
Stars: ✭ 14 (-86.41%)
Mutual labels:  cookie-consent, gdpr
wp-gdpr-cookie-notice
Simple performant cookie consent notice that supports AMP, Web Stories, granular cookie control and live preview customization.
Stars: ✭ 17 (-83.5%)
Mutual labels:  cookie-consent, gdpr
cookieconsent
🍪 Simple cross-browser cookie-consent plugin written in vanilla js
Stars: ✭ 2,158 (+1995.15%)
Mutual labels:  cookie-consent, gdpr
Cookiescanner
Cookie Scanner for GDPR compliance
Stars: ✭ 126 (+22.33%)
Mutual labels:  cookie, gdpr
privera
Use the tools you know. Respect users' privacy. Forget cookie consents. Comply with GDPR, ePrivacy, COPPA, CalOPPA, PECR, PIPEDA, CASL; you name it.
Stars: ✭ 23 (-77.67%)
Mutual labels:  cookie, gdpr
Klaro
Klaro! A privacy and security tool for your website.
Stars: ✭ 640 (+521.36%)
Mutual labels:  cookie, gdpr
Simple Cookie Choices
A simple cookie choices thought to the GDPR rules 🔒🍪
Stars: ✭ 12 (-88.35%)
Mutual labels:  cookie, gdpr
risorse-gdpr
Raccolta di risorse sul GDPR
Stars: ✭ 20 (-80.58%)
Mutual labels:  gdpr, gdpr-cookie
next.js-boilerplate
next.js bolierplate, next.js 的开发模板
Stars: ✭ 28 (-72.82%)
Mutual labels:  cookie

React Cookie Law

npm version Build Status Coverage Status

A React Cookie Banner component GDPR compliance.

Preview

Install


yarn add @palmabit/react-cookie-law

or


npm install --save @palmabit/react-cookie-law

Usage

import { CookieBanner } from "@palmabit/react-cookie-law";

React.renderComponent(
  <div>
    <CookieBanner
      message="Cookie banner message"
      wholeDomain={true}
      onAccept={() => {}}
      onAcceptPreferences={() => {}}
      onAcceptStatistics={() => {}}
      onAcceptMarketing={() => {}}
    />
  </div>,

  document.body
);

Options

Name Type Default Description
className string optional. Classes
message string Required. Custom text of the banner
wholeDomain bool false optional. Enable or disable the root path '/' option when a cookie is set
policyLink string "/#" optional. Link to privacy policy page
privacyPolicyLinkText string "Privacy Policy" optional. Text for the privacy policy link
necessaryOptionText string "Necessary" optional. Text for the necessary cookies checkbox
preferencesOptionText string "Preferences" optional. Text for the preferences cookies checkbox
statisticsOptionText string "Statistics" optional. Text for the statistics cookies checkbox
marketingOptionText string "Marketing" optional. Text for the marketing cookies checkbox
acceptButtonText string "Accept" optional. Text for the accept button
declineButtonText string "Decline" optional. Text for the decline button
managePreferencesButtonText string "Decline" optional. Text for the manage preferences button
savePreferencesButtonText string "Decline" optional. Text for the save and close* button
showDeclineButton bool false optional. Show or hide the decline button
dismissOnScroll bool false optional. Enable or disable the dismissing on scroll of the banner
showPreferencesOption bool true optional. Show or hide the preferences checkbox
showStatisticsOption bool true optional. Show or hide the statistics checkbox
showMarketingOption bool true optional. Show or hide the marketing checkbox
preferencesDefaultChecked bool true optional. Check the preferences checkbox as default
statisticsDefaultChecked bool true optional. Check the statistics checkbox as default
marketingDefaultChecked bool true optional. Check the marketing checkbox as default
onAccept function Function optional. Callback called when the consent is given
onAcceptPreferences function Function optional. Callback called if preferences cookies is accepted
onAcceptStatistics function Function optional. Callback called if statistics cookies is accepted
onAcceptMarketing function Function optional. Callback called if marketing cookies is accepted
onDeclinePreferences function Function optional. Callback called if preferences cookies is declined
onDeclineStatistics function Function optional. Callback called if statistics cookies is declined
onDeclineMarketing function Function optional. Callback called if marketing cookies is declined
coryphaUserId string "1" optional. User ID of the current user
coryphaDocumentCode string "my-app" *optional**. The unique document code assigned to the application
coryphaDocumentLanguage string "en" *optional**. Callback called if *marketing* cookies is declined
coryphaApiKey string "12345678-abcd-dcba-abcd-1234567890ab" *optional**. Your Corypha API Key
onAcceptCoryphaPreferences function Function optional. Callback called when Corypha cookies are accepted
onDeclineCoryphaPreferences function Function optional. Callback called when Corypha cookies are declined

*NOTE: coryphaDocumentCode, coryphaDocumentLanguage and coryphaApiKey are required when setting up the Corypha integration.

Style

<CookieBanner
  message="Cookie banner message"
  styles={{
    dialog: { backgroundColor: "red" },
  }}
/>
Style option Description
dialog Style that override .react-cookie-law-dialog class
container .react-cookie-law-container class
message Style for banner text (.react-cookie-law-message class)
policy Style for cookie policy link (.react-cookie-law-policy class)
selectPane Style for select pane (.react-cookie-law-select-pane class)
optionWrapper Style for option checkbox wrapper (.react-cookie-law-option-wrapper class)
optionLabel Style for the text of checkbox labels
checkbox Style for checkboxes (.react-cookie-law-option-checkbox class)
buttonWrapper Style for buttons wrapper (.react-cookie-law-dialog class)
button Style for buttons (.react-cookie-law-dialog class)

Test


yarn test

or


npm test

Author

Palmabit

Licence

See the MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].