diff --git a/components/modal/react/cookie-consent-banner/CookieConsent.jsx b/components/modal/react/cookie-consent-banner/CookieConsent.jsx
new file mode 100644
index 0000000..4e2567e
--- /dev/null
+++ b/components/modal/react/cookie-consent-banner/CookieConsent.jsx
@@ -0,0 +1,476 @@
+import React, { useState, useEffect } from 'react'
+import {LuCookie, LuX, LuChevronDown, LuChevronUp } from "react-icons/lu";
+
+// Custom Hook for Cookie Consent Management
+const useCookieConsent = (cookieName = 'user_cookie_consent', expiryDays = 365) => {
+ const [consent, setConsent] = useState(null)
+ const [showBanner, setShowBanner] = useState(false)
+
+ // Get consent from cookie
+ const getConsent = () => {
+ if (typeof document === 'undefined') return null
+
+ const cookies = document.cookie.split(';')
+ for (let cookie of cookies) {
+ const [name, value] = cookie.trim().split('=')
+ if (name === cookieName) {
+ try {
+ return JSON.parse(decodeURIComponent(value))
+ } catch (e) {
+ return null
+ }
+ }
+ }
+ return null
+ }
+
+ // Save consent to cookie
+ const saveConsent = (consentData) => {
+ if (typeof document === 'undefined') return
+
+ const consentString = JSON.stringify(consentData)
+ const expiryDate = new Date()
+ expiryDate.setDate(expiryDate.getDate() + expiryDays)
+
+ document.cookie = `${cookieName}=${encodeURIComponent(consentString)}; expires=${expiryDate.toUTCString()}; path=/; SameSite=Lax`
+ setConsent(consentData)
+ setShowBanner(false)
+ }
+
+ // Accept all cookies
+ const acceptAll = () => {
+ const consentData = {
+ essential: true,
+ analytics: true,
+ marketing: true,
+ preferences: true,
+ timestamp: new Date().toISOString()
+ }
+ saveConsent(consentData)
+ return consentData
+ }
+
+ // Reject all cookies
+ const rejectAll = () => {
+ const consentData = {
+ essential: true,
+ analytics: false,
+ marketing: false,
+ preferences: false,
+ timestamp: new Date().toISOString()
+ }
+ saveConsent(consentData)
+ return consentData
+ }
+
+ // Save custom preferences
+ const savePreferences = (preferences) => {
+ const consentData = {
+ essential: true,
+ analytics: preferences.analytics || false,
+ marketing: preferences.marketing || false,
+ preferences: preferences.preferences || false,
+ timestamp: new Date().toISOString()
+ }
+ saveConsent(consentData)
+ return consentData
+ }
+
+ // Withdraw consent
+ const withdrawConsent = () => {
+ if (typeof document === 'undefined') return
+
+ document.cookie = `${cookieName}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`
+ setConsent(null)
+ setShowBanner(true)
+ }
+
+ // Check for existing consent on mount
+ useEffect(() => {
+ const existingConsent = getConsent()
+ if (existingConsent) {
+ setConsent(existingConsent)
+ setShowBanner(false)
+ } else {
+ setShowBanner(true)
+ }
+ }, [])
+
+ return {
+ consent,
+ showBanner,
+ acceptAll,
+ rejectAll,
+ savePreferences,
+ withdrawConsent
+ }
+}
+
+// Cookie Preferences Modal Component
+const CookiePreferences = ({ isOpen, onClose, onSave, currentPreferences }) => {
+ const [preferences, setPreferences] = useState({
+ analytics: false,
+ marketing: false,
+ preferences: false
+ })
+
+ const [expandedCategories, setExpandedCategories] = useState({})
+
+ useEffect(() => {
+ if (currentPreferences) {
+ setPreferences({
+ analytics: currentPreferences.analytics || false,
+ marketing: currentPreferences.marketing || false,
+ preferences: currentPreferences.preferences || false
+ })
+ }
+ }, [currentPreferences])
+
+ const toggleCategory = (category) => {
+ setExpandedCategories(prev => ({
+ ...prev,
+ [category]: !prev[category]
+ }))
+ }
+
+ const handleSave = () => {
+ onSave(preferences)
+ }
+
+ if (!isOpen) return null
+
+ const categories = [
+ {
+ id: 'essential',
+ title: 'Essential Cookies',
+ description: 'Required for the website to function properly. Cannot be disabled.',
+ required: true,
+ cookies: [
+ { name: 'user_cookie_consent', duration: '1 year', purpose: 'Stores user cookie preferences' }
+ ]
+ },
+ {
+ id: 'analytics',
+ title: 'Analytics Cookies',
+ description: 'Help us understand how visitors interact with our website by collecting and reporting information anonymously.',
+ required: false,
+ cookies: [
+ { name: '_ga', duration: '2 years', purpose: 'Google Analytics - distinguishes users' },
+ { name: '_gid', duration: '24 hours', purpose: 'Google Analytics - distinguishes users' }
+ ]
+ },
+ {
+ id: 'marketing',
+ title: 'Marketing Cookies',
+ description: 'Used to deliver personalized advertisements relevant to you and your interests.',
+ required: false,
+ cookies: [
+ { name: '_fbp', duration: '3 months', purpose: 'Facebook Pixel - tracks conversions' },
+ { name: 'IDE', duration: '1 year', purpose: 'Google Ads - advertising tracking' }
+ ]
+ },
+ {
+ id: 'preferences',
+ title: 'Preference Cookies',
+ description: 'Remember your settings and preferences for a better experience.',
+ required: false,
+ cookies: [
+ { name: 'theme', duration: '1 year', purpose: 'Stores user theme preference' },
+ { name: 'language', duration: '1 year', purpose: 'Stores user language preference' }
+ ]
+ }
+ ]
+
+ return (
+ <>
+ {/* Backdrop */}
+
+
+ {/* Modal */}
+
+
+ {/* Header */}
+
+
+ Cookie Preferences
+
+
+
+
+
+
+ {/* Content */}
+
+
+ We use cookies to enhance your browsing experience and analyze our traffic.
+ You can choose which types of cookies to allow below.
+
+
+ {categories.map((category) => (
+
+
+
+
+ {category.required ? (
+
+ ) : (
+
setPreferences({ ...preferences, [category.id]: e.target.checked })}
+ className="w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-2 focus:ring-blue-500 cursor-pointer"
+ aria-label={category.title}
+ />
+ )}
+
+
+
{category.title}
+ {category.required && (
+
+ Always Active
+
+ )}
+
+
{category.description}
+
+
+
toggleCategory(category.id)}
+ className="ml-2 text-gray-400 hover:text-gray-600 transition-colors"
+ aria-label={expandedCategories[category.id] ? 'Hide details' : 'Show details'}
+ >
+ {expandedCategories[category.id] ? (
+
+ ) : (
+
+ )}
+
+
+
+
+ {expandedCategories[category.id] && (
+
+
Cookie Details
+
+ {category.cookies.map((cookie, index) => (
+
+
{cookie.name}
+
Duration: {cookie.duration}
+
Purpose: {cookie.purpose}
+
+ ))}
+
+
+ )}
+
+ ))}
+
+
+ {/* Footer */}
+
+
+ Save Preferences
+
+ {
+ setPreferences({ analytics: true, marketing: true, preferences: true })
+ onSave({ analytics: true, marketing: true, preferences: true })
+ }}
+ className="px-6 py-2.5 bg-green-600 text-white rounded-lg font-medium hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 transition-colors"
+ >
+ Accept All
+
+
+
+
+ >
+ )
+}
+
+// Main Cookie Consent Component
+const CookieConsent = ({
+ position = 'bottom',
+ title = 'We Value Your Privacy',
+ description = 'We use cookies to enhance your browsing experience, serve personalized content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies.',
+ onAccept = null,
+ onReject = null,
+ onPreferencesSave = null,
+ cookieName = 'user_cookie_consent',
+ expiryDays = 365,
+ showSettingsButton = true,
+ policyUrl = '/privacy-policy'
+}) => {
+ const { consent, showBanner, acceptAll, rejectAll, savePreferences } = useCookieConsent(cookieName, expiryDays)
+ const [showPreferences, setShowPreferences] = useState(false)
+
+ const handleAcceptAll = () => {
+ const consentData = acceptAll()
+ if (onAccept) onAccept(consentData)
+ }
+
+ const handleRejectAll = () => {
+ const consentData = rejectAll()
+ if (onReject) onReject(consentData)
+ }
+
+ const handleSavePreferences = (preferences) => {
+ const consentData = savePreferences(preferences)
+ setShowPreferences(false)
+ if (onPreferencesSave) onPreferencesSave(consentData)
+ }
+
+ if (!showBanner) return null
+
+ const positionClasses = {
+ bottom: 'bottom-0 sm:bottom-4 sm:left-4 sm:right-auto',
+ top: 'top-0 sm:top-4 sm:left-4 sm:right-auto'
+ }
+
+ return (
+ <>
+
+
+
+
+ {/* Header */}
+
+
+
+ {title}
+
+
+
+ {/* Content */}
+
+
+ {/* Buttons */}
+
+
+ Reject All
+
+ {showSettingsButton && (
+ setShowPreferences(true)}
+ className="flex-1 px-4 py-2.5 text-sm font-medium text-blue-700 bg-blue-50 border border-blue-200 rounded-lg hover:bg-blue-100 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-colors"
+ aria-label="Manage cookie preferences"
+ >
+ Manage Preferences
+
+ )}
+
+ Accept All
+
+
+
+
+
+ {/* Preferences Modal */}
+ setShowPreferences(false)}
+ onSave={handleSavePreferences}
+ currentPreferences={consent}
+ />
+ >
+ )
+}
+
+import React from 'react'
+import CookieConsent from './CookieConsent'
+
+const bannerDemo =()=> {
+ const showCookieBanner = () => {
+ // Clear consent cookie
+ document.cookie = 'user_cookie_consent=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;'
+ // Reload page to show banner
+ window.location.reload()
+ }
+
+ return (
+
+
+
+ Cookie Consent Banner Demo
+
+
+
+ Show Demo
+
+
+
+
console.log('Accepted:', consent)}
+ onReject={(consent) => console.log('Rejected:', consent)}
+ />
+
+ )
+}
+
+export default bannerDemo;
+
+export { useCookieConsent,CookieConsent }
+
diff --git a/components/modal/react/cookie-consent-banner/README.md b/components/modal/react/cookie-consent-banner/README.md
new file mode 100644
index 0000000..018535d
--- /dev/null
+++ b/components/modal/react/cookie-consent-banner/README.md
@@ -0,0 +1,198 @@
+# Cookie Consent Banner
+
+A fully GDPR-compliant cookie consent banner component for React with Tailwind CSS. Features customizable text, accept/reject buttons, and granular preference management with persistent storage.
+
+---
+
+**Author:** [@GlenFonceca](github.com/GlenFonceca)
+
+---
+
+## Features
+
+- **GDPR Compliant** - Meets all European data protection requirements
+- **Fully Customizable** - Customize text, colors, and position
+- **Privacy-First** - No cookies set until explicit user consent
+- **Granular Control** - Separate preferences for analytics, marketing, and functional cookies
+- **Responsive Design** - Works seamlessly on mobile and desktop
+- **Accessible** - WCAG 2.1 compliant with proper ARIA labels
+- **Persistent Storage** - Remembers user preferences across sessions
+- **Framework Agnostic** - Easy to integrate with any React application
+
+## Installation
+
+No external dependencies required beyond React and Tailwind CSS.
+
+1. Copy the component files to your project
+2. Ensure Tailwind CSS is configured in your project
+3. Import and use the component
+
+## Usage
+
+### Basic Usage
+
+```jsx
+import CookieConsent from './components/CookieConsent'
+
+function App() {
+ return (
+
+
+ {/* Your app content */}
+
+)
+}
+```
+
+### Advanced Usage with Callbacks
+
+```jsx
+import CookieConsent from './components/CookieConsent'
+
+function App() {
+const handleAccept = (consent) => {
+console.log('User accepted cookies:', consent)
+// Load analytics scripts
+if (consent.analytics) {
+// Initialize Google Analytics
+}
+if (consent.marketing) {
+// Initialize marketing pixels
+}
+}
+
+const handleReject = (consent) => {
+console.log('User rejected cookies:', consent)
+}
+
+const handlePreferencesSave = (consent) => {
+console.log('User saved preferences:', consent)
+}
+
+return (
+
+
+
+)
+}
+```
+
+### Programmatic Control
+
+```jsx
+import { useCookieConsent } from './components/useCookieConsent'
+
+function SettingsPage() {
+const { consent, withdrawConsent } = useCookieConsent()
+
+const handleWithdraw = () => {
+withdrawConsent()
+// Banner will reappear
+}
+
+return (
+
+
Privacy Settings
+
Current Consent: {JSON.stringify(consent)}
+
+Withdraw Consent
+
+
+)
+}
+```
+
+## Props
+
+| Prop | Type | Default | Description |
+|------|------|---------|-------------|
+| `position` | string | `'bottom'` | Position of banner: `'bottom'` or `'top'` |
+| `title` | string | `'We Value Your Privacy'` | Main title text |
+| `description` | string | (default text) | Description explaining cookie usage |
+| `onAccept` | function | `null` | Callback when user accepts all cookies |
+| `onReject` | function | `null` | Callback when user rejects cookies |
+| `onPreferencesSave` | function | `null` | Callback when user saves preferences |
+| `cookieName` | string | `'user_cookie_consent'` | Name of the cookie storing consent |
+| `expiryDays` | number | `365` | Days before consent expires |
+| `showSettingsButton` | boolean | `true` | Show manage preferences button |
+| `policyUrl` | string | `'/privacy-policy'` | URL to privacy policy page |
+
+## Cookie Categories
+
+The component manages four categories of cookies:
+
+1. **Essential** - Always active, required for basic functionality
+2. **Analytics** - Track user behavior and site performance
+3. **Marketing** - Personalized advertising and retargeting
+4. **Preferences** - Remember user settings and preferences
+
+## Consent Data Structure
+
+```json
+{
+ essential: true, // Always true
+ analytics: boolean,
+ marketing: boolean,
+ preferences: boolean,
+ timestamp: string // ISO 8601 format
+}
+```
+
+
+## Customization
+
+### Tailwind Configuration
+
+The component uses default Tailwind colors. To customize, modify the classes in the component files or extend your Tailwind config:
+
+```jsx
+// tailwind.config.js
+module.exports = {
+ theme: {
+ extend: {
+ colors: {
+ 'consent-primary': '#your-color',
+ }
+ }
+ }
+}
+```
+
+### Styling
+
+All styles use Tailwind utility classes and can be customized directly in the component files.
+
+## Browser Support
+
+- Chrome (latest)
+- Firefox (latest)
+- Safari (latest)
+- Edge (latest)
+- Mobile browsers (iOS Safari, Chrome Mobile)
+
+## Accessibility
+
+- Semantic HTML with proper ARIA labels
+- Keyboard navigation support
+- Screen reader compatible
+- Focus management for modals
+- High contrast mode support
+
+## GDPR Compliance Checklist
+
+- Clear information about cookie usage
+- Granular consent options
+- Equal prominence for accept/reject buttons
+- No pre-checked boxes
+- Easy access to preferences
+- Ability to withdraw consent
+- Link to privacy policy
+- Consent stored with timestamp
+
+## License
+
+MIT License - feel free to use in personal and commercial projects.
+
+## Support
+
+For issues or questions, please open an issue in the repository.
\ No newline at end of file
diff --git a/components/modal/react/cookie-consent-banner/component.json b/components/modal/react/cookie-consent-banner/component.json
new file mode 100644
index 0000000..e73a4b0
--- /dev/null
+++ b/components/modal/react/cookie-consent-banner/component.json
@@ -0,0 +1,70 @@
+{
+ "name": "cookie-consent-banner",
+ "category": "overlay",
+ "framework": "react",
+ "tags": ["gdpr", "privacy", "cookies", "consent", "compliance", "modal"],
+ "author": "Glen Fonceca",
+ "license": "MIT",
+ "version": "1.0.0",
+ "preview": "A fully GDPR-compliant cookie consent banner with customizable text, accept/reject buttons, and granular preference management. Features include persistent storage, accessibility support, and framework-agnostic design.",
+ "dependencies": [
+ "react",
+ "tailwindcss"
+ ],
+ "props": [
+ {
+ "name": "position",
+ "type": "string",
+ "default": "bottom",
+ "description": "Position of the banner: 'bottom' or 'top'"
+ },
+ {
+ "name": "title",
+ "type": "string",
+ "default": "We Value Your Privacy",
+ "description": "Main title text of the banner"
+ },
+ {
+ "name": "description",
+ "type": "string",
+ "default": "We use cookies to enhance your browsing experience...",
+ "description": "Description text explaining cookie usage"
+ },
+ {
+ "name": "onAccept",
+ "type": "function",
+ "default": "null",
+ "description": "Callback function when user accepts cookies"
+ },
+ {
+ "name": "onReject",
+ "type": "function",
+ "default": "null",
+ "description": "Callback function when user rejects cookies"
+ },
+ {
+ "name": "onPreferencesSave",
+ "type": "function",
+ "default": "null",
+ "description": "Callback function when user saves custom preferences"
+ },
+ {
+ "name": "cookieName",
+ "type": "string",
+ "default": "user_cookie_consent",
+ "description": "Name of the cookie to store consent"
+ },
+ {
+ "name": "expiryDays",
+ "type": "number",
+ "default": "365",
+ "description": "Number of days before consent expires"
+ },
+ {
+ "name": "showSettingsButton",
+ "type": "boolean",
+ "default": "true",
+ "description": "Show the manage preferences button"
+ }
+ ]
+}