Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

πŸͺ Beautiful and customizable react cookie consent widget for your applications

Notifications You must be signed in to change notification settings

cldt-fr/react-cookie-gpdr

Repository files navigation

react-cookie-gpdr

πŸͺ Beautiful and customizable react cookie consent widget for your applications

License: MIT Donate

enter image description here


☁️ Installation

npm install react-cookie-gpdr

πŸ™Œ Example

An example of the react-cookie-gpdr component is available here : Example of use

 <CookieWidget location="right"
 color={"#bb2030"}
 policyLink={"https://example.org"}
 title={"This website"}
 subtitle={"uses cookies"}
 text={"We use cookies and similar methods to recognize visitors and remember their preferences. We also use them to measure ad campaign effectiveness, target ads and analyze site traffic."}
 policyLinkText={"Read the privacy policy"}
 cookieSecurity={true}
 hideOnScrollDown={true}
 onAccept={() => alert('accepted')}
 onReject={() => alert('refused')}/>

πŸš€ Props

Props Description Default value
location Widget position (bottom left or bottom right) "left"
color Color scheme of the widget "#bb2030"
policyLink URL of your policy Link /
policyLinkText URL of your policy Link "Read the privacy policy"
title Widget title "This website"
subtitle Widget subtitle "use Cookies"
text Widget text content "We use cookies and similar methods to recognize visitors and remember their preferences. We also use them to measure ad campaign effectiveness, target ads and analyze site traffic. To learn more about these methods, including how to disable them, view our Cookie Policy."
rejectButtonText Widget reject button "Reject All"
acceptButtonText Widget accept button "Accept All"
cookieSecurity Cookie security (true if you use https) true
hideOnScrollDown Automaticaly hide and accept on scroll down false
onAccept On Accept All function void
onReject On Reject All function void

πŸ’» Development

npm run storybook

This will start Storybook process.

To view the Storybook, go to http://localhost:6006 in your browser.

πŸ”Ž Credits

react-cookie-gpdr is a library of ClΓ©ment de Louvencourt

Special thanks to:

  • Your name here ?

About

πŸͺ Beautiful and customizable react cookie consent widget for your applications

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /