# Documentation v8.0.38

Preview Downloads Purchase

# Overview

Cookie Alert is a simple, good looking cookie alert for Bootstrap and with no dependencies required. For more info on cookies, please visit: https://github.com/Wruczek/Bootstrap-Cookie-Alert

# Usage

Cookie Alert's styles and script bundles are separate from our global bundle and required to be included and initialized manually on related pages.

    <link href="assets/plugins/custom/cookiealert/cookiealert.bundle.css" rel="stylesheet" type="text/css"/>
    <script src="assets/plugins/custom/cookiealert/cookiealert.bundle.js"></script>

# Initialization

- Cookie Alert requires a simple `.cookiealert`CSS class added to any HTML element that will represent the cookie alert message.
- Add `.acceptcookies`CSS class to the cookie "Accept" button to trigger the cookie acceptance.

The cookie alert element can include all of Bootstrap 5 classes, along with our own extended Boostrap 5 CSS classes to make it look and feel exactly as required.

# Cookie Alert

Here's an example of Cookie Alert popping up from the bottom of the screen.
Here's an example of a cookie alert pop up from the bottom of the screen. Click the "Agree" button to accept the cookie. Learn more

    <!--begin::Cookie alert-->
    <div class="d-flex d-lg-block flex-column bg-dark text-light text-center rounded-0 cookiealert py-5">
        Here's an example of a cookie alert pop up from the bottom of the screen.
        Click the "Agree" button to accept the cookie.
        <a href="#">Learn more</a>

        <button type="button" class="btn btn-primary d-inline mx-auto ms-lg-5 acceptcookies mt-5 mt-lg-0">
            I agree
        </button>
    </div>
    <!--end::Cookie alert-->

# Accept Event

Cookie Alert also comes with an event triggered upon accepting the cookie.

Name | Description
--- | ---
`cookieAlertAccept` | Allows JS to hook any function upon accepting a cookie. For more info, please visit the official documentation.
    window.addEventListener("cookieAlertAccept", function() {
        alert("cookies accepted");
    });

### Explore

### Metronic Licenses

License FAQs
Regular License
For single end product used by you or one client
$ 39
Extended License
For single SaaS app with paying users
$ 969
Custom License
Reach us for custom license offers.
Contact Us
Buy Now

### Metronic Demos

Demo 1
Demo 2
Demo 3
Demo 4
Demo 5
Demo 6
Demo 7
Demo 8
Demo 9
Demo 10
Demo 11
Demo 12
Demo 13
Demo 14
Demo 15
Demo 16
Demo 17
Demo 18
Demo 19
Demo 20
Demo 21
Demo 22
Coming soon
Coming soon

##### Learn & Get Inspired

## Support at devs.keenthemes.com

Join our developers community to find answer to your question and help others. FAQs
Get Support
Documentation & Videos
From guides and video tutorials, to live demos and code examples to get started.
Plugins & Components
Check out our 300+ in-house components and customized 3rd-party plugins.
Layout Builder
Build your layout, preview it and export the HTML for server side integration.
Metronic Downloads
Download your prefered framework and demo with one click.
What's New
Latest features and improvements added with our users feedback in mind.
Buy now