Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
reactjs-cookie-consent
Advanced tools
A simple responsive cookie consent component for React applications. The component is configurable to support any kind of styling. We also support
We will show some different usages of the component, much more examples can be found on Algobook.
import { CookieBanner } from "reactjs-cookie-consent";
<CookieBanner />;
<CookieBanner policyLink="/cookiepolicy" />
<CookieBanner ttlDays={120} cookieName="my_cookie_name" />
<CookieBanner
onAcceptClick={() => console.log("Accepted")}
onDenyClick={() => console.log("Denied")}
/>
<CookieBanner
bannerStyles={{ backgroundColor: "rgb(50 48 48 / 50%)" }}
headlineStyles={{ color: "white" }}
textStyles={{ color: "white" }}
acceptBtnStyles={{ color: "white", backgroundColor: "#19da3b" }}
denyBtnStyles={{ color: "white", backgroundColor: "#9c1717" }}
linkStyles={{ color: "#00437d" }}
/>
import {
cookieBanner,
clearConsentCookie,
getConsentCookie }
from "reactjs-cookie-consent";
clearConsentCookie(name?) // provide name if you are not using our default
getConsentCookie(name?) // provide name if you are not using our default
More examples and explanation on Algobook.
We will show some images of how it looks, both per default and with some (really nice) custom styling :)
Is something missing? Not working? Or any feature requests? Just email us, we love to improve our software. Email can be found here.
FAQs
A lightweight and customizable cookie banner in React
The npm package reactjs-cookie-consent receives a total of 5 weekly downloads. As such, reactjs-cookie-consent popularity was classified as not popular.
We found that reactjs-cookie-consent demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.