Gathering detailed insights and metrics for @palmabit/react-cookie-law
Gathering detailed insights and metrics for @palmabit/react-cookie-law
Gathering detailed insights and metrics for @palmabit/react-cookie-law
Gathering detailed insights and metrics for @palmabit/react-cookie-law
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.
npm install @palmabit/react-cookie-law
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
115 Stars
99 Commits
54 Forks
5 Watchers
10 Branches
7 Contributors
Updated on Mar 16, 2025
Latest Version
0.7.0
Package Id
@palmabit/react-cookie-law@0.7.0
Unpacked Size
53.44 kB
Size
16.75 kB
File Count
5
NPM Version
6.12.0
Node Version
12.13.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
5
1
25
A React Cookie Banner component GDPR compliance.
yarn add @palmabit/react-cookie-law
or
npm install --save @palmabit/react-cookie-law
1import { CookieBanner } from "@palmabit/react-cookie-law"; 2 3React.renderComponent( 4 <div> 5 <CookieBanner 6 message="Cookie banner message" 7 wholeDomain={true} 8 onAccept={() => {}} 9 onAcceptPreferences={() => {}} 10 onAcceptStatistics={() => {}} 11 onAcceptMarketing={() => {}} 12 /> 13 </div>, 14 15 document.body 16);
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.
1<CookieBanner 2 message="Cookie banner message" 3 styles={{ 4 dialog: { backgroundColor: "red" }, 5 }} 6/>
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) |
yarn test
or
npm test
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/12 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
25 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More