Bootstrap Cookie Alert screenshot

Bootstrap Cookie Alert

Author Avatar Theme by Wruczek
Updated: 21 Jun 2023
245 Stars

A simple, good looking cookie alert built for Bootstrap 3/4. No dependencies required.

Overview

Bootstrap-Cookie-Alert is a simple cookie alert designed for Bootstrap 5 and 4, with no dependencies required. It provides a straightforward way to inform users about the use of cookies on a website. The alert can be easily customized to match the website’s design.

Features

  • Bootstrap Integration: Compatible with Bootstrap 5 and 4 for seamless integration.
  • Simple Usage: Easy to implement with minimal setup required.
  • Customizable: Can be customized to match the website’s branding and design.
  • Accept Event: Option to listen for the cookieAlertAccept event to handle user interactions.

Installation

  1. Install the package using npm:
    npm i bootstrap-cookie-alert
    
  2. In the head section of your HTML document, include cookiealert.css after Bootstrap:
    <link href="path/to/cookiealert.css" rel="stylesheet">
    
  3. Add the HTML markup for the cookie alert:
    <div class="cookiealert" role="alert">
        <!-- Alert content goes here -->
    </div>
    
  4. Include the JavaScript after the HTML markup:
    <script src="path/to/cookiealert.js"></script>
    

Summary

Bootstrap-Cookie-Alert is a straightforward solution to comply with cookie notification requirements on websites. With its easy integration into Bootstrap projects, minimal setup, and customizable options, it provides a convenient way to inform users about the use of cookies. By following the simple installation guide and utilizing the provided features like the cookieAlertAccept event, website owners can ensure a user-friendly cookie notification experience.