├── .gitignore ├── README.md ├── eslint.config.js ├── index.html ├── package-lock.json ├── package.json ├── postcss.config.js ├── public ├── favicon.svg └── vite.svg ├── src ├── App.jsx ├── components │ ├── Footer.jsx │ ├── Hero.jsx │ └── PatternGrid.jsx ├── data │ └── patterns.js ├── index.css └── main.jsx ├── tailwind.config.js └── vite.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | /.pnp 4 | .pnp.js 5 | 6 | # Testing 7 | /coverage 8 | 9 | # Production 10 | /build 11 | /dist 12 | 13 | # Environment files 14 | .env 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | # Logs 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | logs 25 | *.log 26 | 27 | # Editor directories and files 28 | .vscode/* 29 | !.vscode/extensions.json 30 | .idea 31 | *.suo 32 | *.ntvs* 33 | *.njsproj 34 | *.sln 35 | *.sw? 36 | .DS_Store 37 | .env.local 38 | .env.development.local 39 | .env.test.local 40 | .env.production.local 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # Vite 58 | .vite/ 59 | 60 | # TypeScript 61 | *.tsbuildinfo 62 | 63 | # Cache directories 64 | .cache 65 | .parcel-cache 66 | 67 | # Local Netlify folder 68 | .netlify 69 | 70 | # Temporary files 71 | *.tmp 72 | *.temp 73 | .temp/ 74 | .tmp/ 75 | 76 | # System Files 77 | Thumbs.db 78 | ehthumbs.db 79 | Desktop.ini 80 | $RECYCLE.BIN/ 81 | 82 | # Package manager lock files (uncomment if you want to ignore) 83 | # package-lock.json 84 | # yarn.lock 85 | # pnpm-lock.yaml 86 | 87 | # Debug files 88 | debug.log 89 | debug/ 90 | 91 | # Backup files 92 | *.bak 93 | *.backup 94 | *~ 95 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MotifyX - Transform Your Web Designs with Stunning Background Patterns 2 | 3 |
4 | MotifyX Logo 5 |

MotifyX

6 |
7 | 8 | ✨ Elevate your web projects with MotifyX - an innovative collection of mesmerizing background patterns crafted for modern developers and designers. From sleek geometric shapes to cyberpunk-inspired animations, MotifyX offers a diverse range of customizable patterns that will bring your designs to life. 9 | 10 | ## ✨ Key Features 11 | 12 | - 50+ Handcrafted Premium Patterns 13 | - Rich Pattern Categories: 14 | - 🔷 Geometric Patterns - Clean, minimal designs 15 | - 🚀 Futuristic Patterns - Sci-fi inspired effects 16 | - 👾 Matrix Patterns - Dynamic matrix-style animations 17 | - 💻 Codescape Patterns - Code-themed backgrounds 18 | - 🎨 Dark Gradients - Subtle, modern color transitions 19 | - ⚡ Interactive Dot Patterns - Engaging particle effects 20 | - 🔥 Real-time Pattern Customization 21 | - 📋 Instant CSS Code Generation & Copying 22 | - 📱 Fully Responsive Design 23 | - 🎭 Seamless Animations & Transitions 24 | - 🌙 Dark Mode First Approach 25 | - ⚡ Lightning Fast Performance 26 | - 🎨 Color Customization Options 27 | - 💾 Easy Integration Process 28 | 29 | ## 🚀 Live Demo 30 | 31 | Experience MotifyX in action: [Launch Demo](https://jatin-yadav05.github.io/MotifyX/) 32 | 33 | ## 🛠️ Built With Modern Tech Stack 34 | 35 | - ⚛️ React.js - For dynamic UI components 36 | - 🎨 Tailwind CSS - For utility-first styling 37 | - 💫 Framer Motion - For smooth animations 38 | - 📦 React Icons - For beautiful iconography 39 | - 🎭 CSS Animations - For engaging interactions 40 | - 🔧 Vite - For lightning-fast development 41 | 42 | ## 🌟 Getting Started 43 | 44 | Let's get you up and running with MotifyX: 45 | 46 | 1. Clone the repository: 47 | ```bash 48 | git clone https://github.com/jatin-yadav05/MotifyX.git 49 | ``` 50 | 51 | 2. Install dependencies: 52 | ```bash 53 | npm install 54 | ``` 55 | 56 | 3. Start development server: 57 | ```bash 58 | npm run dev 59 | ``` 60 | 61 | ## 🤝 Contributing 62 | 63 | Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. 64 | 65 | 1. Fork the Project 66 | 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) 67 | 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) 68 | 4. Push to the Branch (`git push origin feature/AmazingFeature`) 69 | 5. Open a Pull Request 70 | 71 | ## 📝 License 72 | 73 | Distributed under the MIT License. See `LICENSE` for more information. 74 | 75 | ## 📬 Contact 76 | 77 | Jatin Yadav - [@jatinyadav_05](https://twitter.com/jatinyadav_05) 78 | 79 | Project Link: [https://github.com/jatin-yadav05/MotifyX](https://github.com/jatin-yadav05/MotifyX) 80 | 81 | ## 🙏 Acknowledgments 82 | 83 | * [React.js](https://reactjs.org/) 84 | * [Tailwind CSS](https://tailwindcss.com/) 85 | * [Framer Motion](https://www.framer.com/motion/) 86 | * [React Icons](https://react-icons.github.io/react-icons/) 87 | * [Vite](https://vitejs.dev/) 88 | 89 | --- 90 | 91 | Made with ❤️ by [Jatin Yadav](https://github.com/jatin-yadav05) 92 | -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js' 2 | import globals from 'globals' 3 | import react from 'eslint-plugin-react' 4 | import reactHooks from 'eslint-plugin-react-hooks' 5 | import reactRefresh from 'eslint-plugin-react-refresh' 6 | 7 | export default [ 8 | { ignores: ['dist'] }, 9 | { 10 | files: ['**/*.{js,jsx}'], 11 | languageOptions: { 12 | ecmaVersion: 2020, 13 | globals: globals.browser, 14 | parserOptions: { 15 | ecmaVersion: 'latest', 16 | ecmaFeatures: { jsx: true }, 17 | sourceType: 'module', 18 | }, 19 | }, 20 | settings: { react: { version: '18.3' } }, 21 | plugins: { 22 | react, 23 | 'react-hooks': reactHooks, 24 | 'react-refresh': reactRefresh, 25 | }, 26 | rules: { 27 | ...js.configs.recommended.rules, 28 | ...react.configs.recommended.rules, 29 | ...react.configs['jsx-runtime'].rules, 30 | ...reactHooks.configs.recommended.rules, 31 | 'react/jsx-no-target-blank': 'off', 32 | 'react-refresh/only-export-components': [ 33 | 'warn', 34 | { allowConstantExport: true }, 35 | ], 36 | }, 37 | }, 38 | ] 39 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | MotifyX 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bgcollection", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint .", 10 | "preview": "vite preview", 11 | "predeploy": "npm run build", 12 | "deploy": "gh-pages -d dist" 13 | }, 14 | "dependencies": { 15 | "framer-motion": "^11.15.0", 16 | "react": "^18.3.1", 17 | "react-dom": "^18.3.1", 18 | "react-icons": "^5.4.0" 19 | }, 20 | "devDependencies": { 21 | "@eslint/js": "^9.17.0", 22 | "@types/react": "^18.3.17", 23 | "@types/react-dom": "^18.3.5", 24 | "@vitejs/plugin-react": "^4.3.4", 25 | "autoprefixer": "^10.4.20", 26 | "eslint": "^9.17.0", 27 | "eslint-plugin-react": "^7.37.2", 28 | "eslint-plugin-react-hooks": "^5.0.0", 29 | "eslint-plugin-react-refresh": "^0.4.16", 30 | "gh-pages": "^6.2.0", 31 | "globals": "^15.13.0", 32 | "postcss": "^8.4.49", 33 | "tailwindcss": "^3.4.17", 34 | "vite": "^6.0.3" 35 | }, 36 | "homepage": "https://jatin-yadav05.github.io/MotifyX" 37 | } 38 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /public/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/App.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect, useRef } from 'react' 2 | import { FaGithub, FaLinkedin } from 'react-icons/fa' 3 | import { HiSparkles, HiCode, HiClipboard, HiEye, HiColorSwatch, HiX, HiCheck, HiRefresh, HiPlay, HiPause, HiChevronUp, HiSelector } from 'react-icons/hi' 4 | import { motion, AnimatePresence } from 'framer-motion' 5 | import {patterns} from './data/patterns' 6 | import Footer from './components/Footer' 7 | 8 | 9 | // Rename the component to CustomGlitchText 10 | const CustomGlitchText = ({ text, className = "" }) => { 11 | return ( 12 |
13 | {/* Main Text */} 14 | 15 | {text} 16 | 17 | 18 | {/* Animated Glowing Line */} 19 |
20 | {/* Base glow layers */} 21 |
22 |
23 | 24 | {/* Moving highlight */} 25 |
26 |
27 |
28 | 29 | {/* Extra glow effect */} 30 |
31 |
32 |
33 | ); 34 | }; 35 | 36 | function App() { 37 | const [selectedPattern, setSelectedPattern] = useState(null) 38 | const [showCopyNotification, setShowCopyNotification] = useState(false) 39 | const [customColors, setCustomColors] = useState({}) 40 | const [isAnimationPaused, setIsAnimationPaused] = useState(false) 41 | const [isAppliedToPage, setIsAppliedToPage] = useState(false) 42 | const [activeSection, setActiveSection] = useState('geometric') 43 | const [isMenuOpen, setIsMenuOpen] = useState(false) 44 | const dropupRef = useRef(null) 45 | const [hasInteracted, setHasInteracted] = useState(false) 46 | 47 | 48 | 49 | const handleCopyCSS = (pattern) => { 50 | const cssString = Object.entries(pattern.style) 51 | .map(([key, value]) => `${key.replace(/[A-Z]/g, m => '-' + m.toLowerCase())}: ${value};`) 52 | .join('\n'); 53 | navigator.clipboard.writeText(cssString); 54 | setShowCopyNotification(true); 55 | setTimeout(() => setShowCopyNotification(false), 2000); 56 | } 57 | 58 | const getModifiedStyle = (pattern) => { 59 | if (!customColors[pattern.id]) return pattern.style; 60 | 61 | const newStyle = { ...pattern.style }; 62 | if (pattern.category === 'gradients') { 63 | const colors = [ 64 | customColors[pattern.id]?.color1 || (pattern.id === 4 ? '#ff3366' : '#12c2e9'), 65 | customColors[pattern.id]?.color2 || (pattern.id === 4 ? '#00ff99' : '#c471ed'), 66 | customColors[pattern.id]?.color3 || (pattern.id === 4 ? null : '#f64f59'), 67 | ].filter(Boolean); 68 | 69 | newStyle.backgroundImage = `linear-gradient(45deg, ${colors.join(', ')})`; 70 | newStyle.backgroundSize = '200% 200%'; 71 | if (!newStyle.animation && pattern.category === 'gradients') { 72 | newStyle.animation = 'gradient 10s ease infinite'; 73 | } 74 | } else { 75 | newStyle.backgroundColor = customColors[pattern.id]?.backgroundColor || pattern.style.backgroundColor; 76 | if (pattern.category === 'patterns' || pattern.category === 'geometric') { 77 | const patternColor = customColors[pattern.id]?.patternColor || 'rgba(255, 255, 255, 0.05)'; 78 | newStyle.backgroundImage = pattern.style.backgroundImage.replace( 79 | /rgba\(255,\s*255,\s*255,\s*[\d.]+\)/g, 80 | patternColor 81 | ); 82 | } 83 | } 84 | return newStyle; 85 | } 86 | 87 | const toggleAnimation = (pattern) => { 88 | setIsAnimationPaused(!isAnimationPaused); 89 | const style = document.documentElement.style; 90 | if (isAnimationPaused) { 91 | style.setProperty('--animation-play-state', 'running'); 92 | } else { 93 | style.setProperty('--animation-play-state', 'paused'); 94 | } 95 | } 96 | 97 | const applyToPage = (pattern) => { 98 | const mainElement = document.querySelector('.min-h-screen'); 99 | 100 | if (mainElement) { 101 | // Reset previous styles 102 | mainElement.style.background = 'none'; 103 | mainElement.style.animation = 'none'; 104 | 105 | // Apply new styles 106 | const modifiedStyle = getModifiedStyle(pattern); 107 | 108 | Object.entries(modifiedStyle).forEach(([key, value]) => { 109 | mainElement.style[key] = value; 110 | }); 111 | 112 | // Make sure content remains visible 113 | mainElement.style.position = 'relative'; 114 | mainElement.style.zIndex = '0'; 115 | 116 | // Add transition 117 | mainElement.style.transition = 'background-color 0.3s, background-image 0.3s'; 118 | } 119 | 120 | setIsAppliedToPage(true); 121 | setTimeout(() => setIsAppliedToPage(false), 2000); 122 | } 123 | 124 | const resetBackground = () => { 125 | const mainElement = document.querySelector('.min-h-screen'); 126 | if (mainElement) { 127 | mainElement.style.background = ''; 128 | mainElement.style.backgroundColor = ''; 129 | mainElement.style.backgroundImage = ''; 130 | mainElement.style.backgroundSize = ''; 131 | mainElement.style.backgroundPosition = ''; 132 | mainElement.style.animation = ''; 133 | mainElement.className = 'min-h-screen bg-zinc-950 text-white selection:bg-violet-500/30 transition-all duration-300'; 134 | } 135 | } 136 | 137 | useEffect(() => { 138 | function handleClickOutside(event) { 139 | if (dropupRef.current && !dropupRef.current.contains(event.target)) { 140 | setIsMenuOpen(false) 141 | } 142 | } 143 | 144 | document.addEventListener('mousedown', handleClickOutside) 145 | return () => { 146 | document.removeEventListener('mousedown', handleClickOutside) 147 | } 148 | }, []) 149 | 150 | // Add this function at the top of your component 151 | const scrollToPatterns = () => { 152 | const patternsSection = document.querySelector('.patterns-section') 153 | patternsSection?.scrollIntoView({ behavior: 'smooth' }) 154 | } 155 | 156 | return ( 157 |
158 | {/* Navbar */} 159 | 205 | 206 | {/* Main content wrapper */} 207 |
208 | {/* Hero Section - adjust bottom padding */} 209 |
210 |
211 |
212 |
213 |
214 | 215 | Design with confidence 216 | 217 | 100% free & open source 218 |
219 | 220 |

221 | Transform your
222 | 226 | {' '} 227 | effortlessly 228 |

229 | 230 |

231 | Elevate your designs with our curated collection of modern background patterns. 232 | Preview, customize, and implement with just a few clicks. 233 |

234 | 235 |
236 | 243 | 249 | View on GitHub 250 | 251 |
252 |
253 |
254 | 255 | {/* Patterns Section - adjust padding */} 256 |
257 | {/* Active Section Content */} 258 |
259 |
264 |
265 |

Futuristic Patterns

266 |

Next-gen patterns inspired by cyberpunk and tech aesthetics

267 |
268 |
269 | {patterns 270 | .filter(pattern => pattern.category === 'futuristic') 271 | .map((pattern) => ( 272 |
274 |
275 |
279 |
280 |

{pattern.name}

281 |

{pattern.description}

282 |
283 | 290 | 297 |
298 |
299 |
300 | ))} 301 |
302 |
303 | 304 |
309 |
310 |

Geometric Patterns

311 |

Clean, structured patterns for sophisticated designs

312 |
313 |
314 | {patterns 315 | .filter(pattern => pattern.category === 'geometric') 316 | .map((pattern) => ( 317 |
319 |
320 |
324 |
325 |

{pattern.name}

326 |

{pattern.description}

327 |
328 | 335 | 342 |
343 |
344 |
345 | ))} 346 |
347 |
348 | 349 |
354 |
355 |

Dot Patterns

356 |

Subtle, repeating patterns for texture and depth

357 |
358 |
359 | {patterns 360 | .filter(pattern => pattern.category === 'patterns') 361 | .map((pattern) => ( 362 |
364 |
365 |
369 |
370 |

{pattern.name}

371 |

{pattern.description}

372 |
373 | 380 | 387 |
388 |
389 |
390 | ))} 391 |
392 |
393 | 394 |
399 |
400 |

Matrix Patterns

401 |

Digital code and binary-inspired backgrounds

402 |
403 |
404 | {patterns 405 | .filter(pattern => pattern.category === 'matrix') 406 | .map((pattern) => ( 407 |
409 |
410 |
414 |
415 |

{pattern.name}

416 |

{pattern.description}

417 |
418 | 425 | 432 |
433 |
434 |
435 | ))} 436 |
437 |
438 | 439 |
444 |
445 |

Codescape Patterns

446 |

Programming landscapes and code-inspired designs

447 |
448 |
449 | {patterns 450 | .filter(pattern => pattern.category === 'codescape') 451 | .map((pattern) => ( 452 |
454 |
455 |
459 |
460 |

{pattern.name}

461 |

{pattern.description}

462 |
463 | 470 | 477 |
478 |
479 |
480 | ))} 481 |
482 |
483 | 484 |
489 |
490 |

Dark Gradients

491 |

Subtle, dark gradient patterns for modern interfaces

492 |
493 |
494 | {patterns 495 | .filter(pattern => pattern.category === 'gradients') 496 | .map((pattern) => ( 497 |
499 |
500 |
504 |
505 |

{pattern.name}

506 |

{pattern.description}

507 |
508 | 515 | 522 |
523 |
524 |
525 | ))} 526 |
527 |
528 |
529 | 530 | {/* Section Selector */} 531 |
532 |
533 | 550 | 551 | {/* Dropdown Menu */} 552 |
557 |
558 | {['geometric', 'futuristic', 'patterns', 'matrix', 'codescape', 'gradients'].map((section) => ( 559 | 571 | ))} 572 |
573 |
574 |
575 |
576 |
577 |
578 | 579 |