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

Appearance settings

adrcav/cookies-notification

Open more actions menu

Repository files navigation

🍪 CookiesNotification

jsdelivr hits Build Status Dependencies License: MIT

A simple and lightweight cookies consent notification.

Preview

Preview

Installation

You can use CookiesNotification from CDN or manual download. There are no dependencies, so you can import and just start.

<!-- head -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/adrcav/cookies-notification@latest/dist/css/cookies-notification.min.css">

<!-- body -->
<script src="https://cdn.jsdelivr.net/gh/adrcav/cookies-notification@latest/dist/js/cookies-notification.min.js"></script>

If you have imported CookiesNotification via one of the above methods, you are ready to get started.

Usage

Here's an example of a basic implementation:

const cookies = new CookiesNotification();

You can also customize the notification, here's a default options:

const options = {
  container: document.body,
  message: 'We use cookies and others technologies to make interactions with our services easy and meaningful. By continuing to use this site you are giving us your consent to do this.',
  confirmButton: 'Got it',
  showCancelButton: false,
  cancelButton: 'Decline',
  position: 'left',
  borderColor: '#333333',
  remember: 365
};

const cookies = new CookiesNotification(options);

License

This project is licensed under the MIT License - see the LICENSE file for details

About

🍪 A simple and lightweight cookies consent notification

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.