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
npm install @palmabit/react-cookie-law
33.6
Supply Chain
84.8
Quality
80.6
Maintenance
50
Vulnerability
87.6
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
115 Stars
99 Commits
55 Forks
5 Watching
10 Branches
7 Contributors
Updated on 01 Oct 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
45.7%
134
Compared to previous day
Last week
8.6%
554
Compared to previous week
Last month
-3.4%
2,252
Compared to previous month
Last year
-31.8%
35,229
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
23 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
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