├── app ├── favicon.ico ├── components │ ├── playground.tsx │ └── background.tsx ├── globals.css ├── layout.tsx └── page.tsx ├── public ├── banner.jpg ├── cover.webp ├── vercel.svg └── next.svg ├── postcss.config.js ├── next.config.js ├── lib └── utils.ts ├── .eslintrc.json ├── README.md ├── .prettierrc.json ├── components.json ├── .gitignore ├── tsconfig.json ├── package.json ├── components └── ui │ └── button.tsx └── tailwind.config.js /app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibelick/background-snippets/HEAD/app/favicon.ico -------------------------------------------------------------------------------- /public/banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibelick/background-snippets/HEAD/public/banner.jpg -------------------------------------------------------------------------------- /public/cover.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibelick/background-snippets/HEAD/public/cover.webp -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | module.exports = nextConfig; 5 | -------------------------------------------------------------------------------- /lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from 'clsx'; 2 | import { twMerge } from 'tailwind-merge'; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["next/core-web-vitals", "plugin:prettier/recommended"], 3 | "plugins": ["prettier", "prettier-plugin-tailwindcss"], 4 | "rules": { 5 | "prettier/prettier": "error" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## BG.IBELICK 4 | 5 | Collection of modern, background snippets. 6 | Ready to use, simply copy and paste it into your next project. All snippets are crafted with Tailwind CSS. 7 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": true, 6 | "singleQuote": true, 7 | "trailingComma": "es5", 8 | "bracketSpacing": true, 9 | "jsxBracketSameLine": false, 10 | "arrowParens": "avoid", 11 | "endOfLine": "auto" 12 | } 13 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tailwind": { 6 | "config": "tailwind.config.js", 7 | "css": "app/globals.css", 8 | "baseColor": "neutral", 9 | "cssVariables": true 10 | }, 11 | "aliases": { 12 | "components": "@/components", 13 | "utils": "@/lib/utils" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "esModuleInterop": true, 11 | "module": "esnext", 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "jsx": "preserve", 16 | "incremental": true, 17 | "plugins": [ 18 | { 19 | "name": "next" 20 | } 21 | ], 22 | "paths": { 23 | "@/*": ["./*"] 24 | } 25 | }, 26 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 27 | "exclude": ["node_modules"] 28 | } 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "background-snippets", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@radix-ui/react-slot": "^1.0.2", 13 | "@types/node": "20.3.3", 14 | "@types/react": "18.2.14", 15 | "@types/react-dom": "18.2.6", 16 | "autoprefixer": "10.4.14", 17 | "class-variance-authority": "^0.6.1", 18 | "clsx": "^1.2.1", 19 | "eslint": "8.44.0", 20 | "eslint-config-next": "13.4.8", 21 | "lucide-react": "^0.258.0", 22 | "next": "13.4.8", 23 | "postcss": "8.4.24", 24 | "react": "18.2.0", 25 | "react-dom": "18.2.0", 26 | "sonner": "^0.5.0", 27 | "tailwind-merge": "^1.13.2", 28 | "tailwindcss": "3.3.2", 29 | "tailwindcss-animate": "^1.0.6", 30 | "typescript": "5.1.6" 31 | }, 32 | "devDependencies": { 33 | "prettier": "^3.0.0", 34 | "prettier-plugin-tailwindcss": "^0.4.0" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /public/next.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/components/playground.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOMServer from 'react-dom/server'; 3 | import { toast } from 'sonner'; 4 | 5 | type PlaygroundProps = { 6 | children: React.ReactElement; 7 | setPreview: (preview: React.ReactNode) => void; 8 | theme: 'light' | 'dark'; 9 | setTheme: (theme: 'light' | 'dark') => void; 10 | }; 11 | 12 | const Playground: React.FC = ({ 13 | children, 14 | setPreview, 15 | theme, 16 | setTheme, 17 | }) => { 18 | const copyCode = () => { 19 | const code = ReactDOMServer.renderToString(children); 20 | 21 | navigator.clipboard.writeText(code); 22 | toast.success('Copied to clipboard'); 23 | }; 24 | 25 | return ( 26 | <> 27 |
28 |
29 |
30 |
{ 33 | setPreview(children); 34 | setTheme(theme); 35 | }} 36 | > 37 | preview 38 |
39 |
43 | copy code 44 |
45 |
46 |
47 | {children} 48 |
49 | 50 | ); 51 | }; 52 | 53 | export default Playground; 54 | -------------------------------------------------------------------------------- /app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | @layer base { 6 | :root { 7 | --background: 0 0% 100%; 8 | --foreground: 0 0% 3.9%; 9 | 10 | --muted: 0 0% 96.1%; 11 | --muted-foreground: 0 0% 45.1%; 12 | 13 | --popover: 0 0% 100%; 14 | --popover-foreground: 0 0% 3.9%; 15 | 16 | --card: 0 0% 100%; 17 | --card-foreground: 0 0% 3.9%; 18 | 19 | --border: 0 0% 89.8%; 20 | --input: 0 0% 89.8%; 21 | 22 | --primary: 0 0% 9%; 23 | --primary-foreground: 0 0% 98%; 24 | 25 | --secondary: 0 0% 96.1%; 26 | --secondary-foreground: 0 0% 9%; 27 | 28 | --accent: 0 0% 96.1%; 29 | --accent-foreground: 0 0% 9%; 30 | 31 | --destructive: 0 84.2% 60.2%; 32 | --destructive-foreground: 0 0% 98%; 33 | 34 | --ring: 0 0% 63.9%; 35 | 36 | --radius: 0.5rem; 37 | } 38 | 39 | .dark { 40 | --background: 0 0% 3.9%; 41 | --foreground: 0 0% 98%; 42 | 43 | --muted: 0 0% 14.9%; 44 | --muted-foreground: 0 0% 63.9%; 45 | 46 | --popover: 0 0% 3.9%; 47 | --popover-foreground: 0 0% 98%; 48 | 49 | --card: 0 0% 3.9%; 50 | --card-foreground: 0 0% 98%; 51 | 52 | --border: 0 0% 14.9%; 53 | --input: 0 0% 14.9%; 54 | 55 | --primary: 0 0% 98%; 56 | --primary-foreground: 0 0% 9%; 57 | 58 | --secondary: 0 0% 14.9%; 59 | --secondary-foreground: 0 0% 98%; 60 | 61 | --accent: 0 0% 14.9%; 62 | --accent-foreground: 0 0% 98%; 63 | 64 | --destructive: 0 62.8% 30.6%; 65 | --destructive-foreground: 0 85.7% 97.3%; 66 | 67 | --ring: 0 0% 14.9%; 68 | } 69 | } 70 | 71 | @layer base { 72 | * { 73 | @apply border-border; 74 | } 75 | body { 76 | @apply bg-background text-foreground; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /app/layout.tsx: -------------------------------------------------------------------------------- 1 | import Script from 'next/script'; 2 | import './globals.css'; 3 | import { Inter } from 'next/font/google'; 4 | 5 | const inter = Inter({ subsets: ['latin'] }); 6 | 7 | export const metadata = { 8 | title: 'BG.IBELICK - Modern, Ready-to-Use Background Snippets for Developers', 9 | description: 10 | 'A collection of modern background snippets for web developers. Ready-to-use snippets crafted with Tailwind CSS and Vanilla CSS for seamless integration.', 11 | keywords: 12 | 'background snippets, Tailwind CSS, CSS snippets, web development, front-end snippets, free CSS resources', 13 | openGraph: { 14 | title: 'BG.IBELICK - Ready-to-Use Background Snippets', 15 | description: 16 | 'Modern background snippets for web developers crafted with Tailwind CSS and Vanilla CSS.', 17 | url: 'https://bg.ibelick.com', 18 | type: 'website', 19 | images: [ 20 | { 21 | url: '/banner.jpg', 22 | width: 1200, 23 | height: 630, 24 | alt: 'BG.IBELICK Cover Image', 25 | }, 26 | ], 27 | }, 28 | twitter: { 29 | card: 'summary_large_image', 30 | title: 'BG.IBELICK - Ready-to-Use Background Snippets', 31 | description: 32 | 'Modern background snippets for web developers crafted with Tailwind CSS and Vanilla CSS.', 33 | image: '/banner.jpg', 34 | }, 35 | }; 36 | 37 | export default function RootLayout({ 38 | children, 39 | }: { 40 | children: React.ReactNode; 41 | }) { 42 | const isDev = process.env.NODE_ENV === 'development'; 43 | 44 | return ( 45 | 46 | 47 | {!isDev ? ( 48 |