Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
bite-consent
Advanced tools
BitConsent is a lightweight React library for managing cookie consent in web applications. Easily integrate a customizable cookie banner with options to view the privacy policy or accept cookies with a single click.
Bite Consent is a lightweight React library for managing cookie consent banners with customizable descriptions and actions. It provides an easy way to implement cookie consent functionality in your React applications while ensuring compliance with privacy regulations.
You can install Bite Consent via npm or yarn:
npm install bite-consent framer-motion
or
yarn add bite-consent framer-motion
To use Bite Consent in your React application, simply import the CookieConsent component and include it in your component tree:
import React from 'react'
import { BiteConsent } from 'bite-consent'
function App() {
return (
<div className="App">
<header className="App-header">
<h1>Welcome to My Website</h1>
</header>
<main>
<BiteConsent privacyPolicyUrl="https://example.com/privacy-policy" />
</main>
</div>
)
}
export default App
Name | Type | Default | Description |
---|---|---|---|
privacyPolicyUrl | string | undefined | The URL to your privacy policy. Required. |
text | string | Hey there! We use cookies to keep things running smoothly on our website and to get to know you better. It helps us make your time here as awesome as possible! ❤️ | Custom text to display in the consent banner. |
visibility | auto | visible | hidden | auto | Specifies the visibility of the consent banner. auto displays the view based on the availability of the consent cookie, whereas visible displays and hidden hides it. |
position | Position | CustomPosition | bottom-left | Sets the position of the consent view on the page. |
onAccept | function | () => void | A function to be called when the user accepts the cookie policy. |
Bite Consent is released under the MIT License.
FAQs
BitConsent is a lightweight React library for managing cookie consent in web applications. Easily integrate a customizable cookie banner with options to view the privacy policy or accept cookies with a single click.
The npm package bite-consent receives a total of 1 weekly downloads. As such, bite-consent popularity was classified as not popular.
We found that bite-consent demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.