diff --git a/app/components/background.tsx b/app/components/background.tsx
index 44773ae..6612c5f 100644
--- a/app/components/background.tsx
+++ b/app/components/background.tsx
@@ -1,3 +1,4 @@
+import React, { useEffect, useRef, useState } from 'react';
const BgLightGrid1 = () => {
return (
@@ -6,7 +7,7 @@ const BgLightGrid1 = () => {
const BgLightGrid2 = () => {
return (
-
+
);
@@ -155,6 +156,497 @@ const BgDarkGrid3 = () => {
);
};
+const BgDarkGrid4 = () => {
+ return (
+
+
+ );
+};
+const BgDarkGrid5 = () => {
+ return (
+
+
+
+ );
+};
+
+const BgDarkGrid7 = () => {
+ return (
+
+
+ );
+};
+const BgLightGridD1 = () => {
+ return (
+
+ );
+};
+const BgLightGridD2 = () => {
+ return (
+
+ );
+};
+const BgColorGrids = () => {
+ return (
+
+ );
+};
+const BgColorGridsA1 = () => {
+ return (
+
+
+
+ );
+};
+const BgColorGridsA2 = () => {
+ return (
+
+
+ );
+};
+const BgColorGridsA3 = () => {
+ return (
+
+ );
+};
+const BgColorGridsA4 = () => {
+ return (
+
+
+ );
+};
+const BgColorGridsA5 = () => {
+ return (
+
+ );
+};
+const BgColorGridsA6 = () => {
+ return (
+
+ );
+};
+const BgColorGridsA7 = () => {
+ return (
+
+ );
+};
+const BgColorGridsA8 = () => {
+ return (
+
+ );
+ };
+const BgColorGridsA9 = () => {
+ return (
+
+ {/* Background Gradient */}
+
+
+ {/* Particles */}
+ {[...Array(50)].map((_, i) => (
+
+ ))}
+
+
+
+ );
+ };
+
+
+ const BgColorGridsA10: React.FC = () => {
+ return (
+
+ );
+};
+export default BgColorGrids;
+const CrazyAnimatedBackground: React.FC = () => {
+ return (
+
+ );
+};
+const WaterBloomBackground: React.FC = () => {
+ return (
+
+
+
+ {Array.from({ length: 50 }).map((_, index) => (
+
+ ))}
+
+
+
+
+ );
+};
+const CartoonCloudsBackground: React.FC = () => {
+ return (
+
+
+
+
+ {Array.from({ length: 10 }).map((_, index) => (
+
+ ))}
+
+
+
+
+
+ );
+};
+const Darkbg1 = () => {
+ return (
+
+
+ );
+};
+const Darkbg2 = () => {
+ return (
+
+
+ );
+};
+const Lightbg1 = () => {
+ return (
+
+
+
+ );
+};
+const Lightbg2 = () => {
+ return (
+
+ );
+};
+const Lightbg3 = () => {
+ return (
+
+ );
+};
+const Lightbg4 = () => {
+ return (
+
+
+ );
+};
+const Lightbg5 = () => {
+ return (
+
+
+
+ );
+};
+const Lightbg6 = () => {
+ return (
+
+
+
+ );
+};
+const Lightbg7 = () => {
+ return (
+
+
+
+ );
+};
+const Lightbg8 = () => {
+ return (
+
+
+
+
+ );
+};
+const Lightbg9 = () => {
+ return (
+
+
+
+ );
+};
+const Lightbg10 = () => {
+ return (
+
+
+
+
+ );
+};
export const BACKGROUND_OPTIONS = [
{
@@ -267,4 +759,165 @@ export const BACKGROUND_OPTIONS = [
component: ,
theme: 'dark',
},
-] as const;
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+ // {
+ // name: 'Background Dark Grid 3',
+ // component: ,
+ // theme: 'dark',
+ // },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'light',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'light',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'light',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'light',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'light',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'ligth',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'ligth',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'ligth',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'ligth',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'ligth',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'ligth',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'light',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'light',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'ligth',
+ },
+ {
+ name: 'Background Dark Grid 3',
+ component: ,
+ theme: 'dark',
+ },
+
+] as const;
\ No newline at end of file
diff --git a/app/page.tsx b/app/page.tsx
index ab50ffa..e0461e2 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -1,20 +1,27 @@
'use client';
-import { ArrowRight, Github, Twitter } from 'lucide-react';
+import { ArrowRight, Github, Twitter, Sun, Moon } from 'lucide-react';
+
import { BACKGROUND_OPTIONS } from './components/background';
import { Button } from '@/components/ui/button';
import Playground from './components/playground';
-import { useState } from 'react';
+import { useState, ReactNode } from 'react';
import { Toaster } from 'sonner';
+type Theme = 'light' | 'dark';
+
export default function Home() {
- const [preview, setPreview] = useState(null);
- const [theme, setTheme] = useState<'light' | 'dark'>('light');
+ const [preview, setPreview] = useState(null);
+ const [theme, setTheme] = useState('light');
const resetBg = () => {
setPreview(null);
setTheme('light');
};
+ const toggleTheme = () => {
+ setTheme(prevTheme => (prevTheme === 'light' ? 'dark' : 'light'));
+ };
+
return (
<>
@@ -24,16 +31,20 @@ export default function Home() {
-
-
+
+
+ Modern Bg
+
+
+
@@ -44,10 +55,20 @@ export default function Home() {
className="inline-flex"
>
+
+
+ {theme === 'light' ? : }
+ {theme === 'light' ? 'Dark Mode' : 'Light Mode'}
+
+
@@ -60,13 +81,13 @@ export default function Home() {
className="inline-flex"
>
-
-
+
+
New snippets ⚡️
-
+
Read more{' '}
@@ -74,14 +95,14 @@ export default function Home() {
-
+
Collection of modern,{' '}
-
+
background snippets
-
- Ready-to-use, simply copy and paste into your next project. All
+
+ 50+ Ready-to-use, simply copy and paste into your next project. All
snippets crafted with Tailwind CSS and{' '}
Vanilla CSS for
easy integration.
@@ -94,8 +115,8 @@ export default function Home() {
className="inline-flex items-center"
>
- Go to GitHub
- {' '}
+ Go to Github
+
Reset background
@@ -105,20 +126,18 @@ export default function Home() {
- {BACKGROUND_OPTIONS.map((background, index) => {
- return (
-
- {background.component}
-
- );
- })}
+ {BACKGROUND_OPTIONS.map((background, index) => (
+
+ {background.component}
+
+ ))}
-
+
{`These backgrounds are made for a full page background. The preview
can be different from the actual result. Click on preview to test
it. And don't forget to tweak it to your needs.`}
@@ -126,15 +145,15 @@ export default function Home() {