
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
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
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.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.