A Single Page Application (SPA) built with Next.js 14+ that generates 100 gradient cards using only official Tailwind CSS colors. Each card has a 16:10 aspect ratio and displays Tailwind colors and ready-to-use classes.
π View Live Demo on GitHub Pages
- 100 unique cards with deterministic generation (no hydration issues)
- Official Tailwind colors (slate, gray, blue, red, green, etc.)
- Tailwind gradients with 2-3 colors each
- 16:10 aspect ratio for all cards
- Ready-to-use Tailwind classes for copy and paste
- 8 gradient directions with Phosphor Icons
- Deterministic generation - same results on server and client
- Copy colors - Individual Tailwind colors (e.g., blue-500, red-400)
- Copy classes - Complete gradient classes (e.g., bg-gradient-to-r from-blue-500 to-red-400)
- Visual feedback when copying
- Phosphor Icons for gradient directions
- Smooth hover effects and animations
- Fully responsive interface
- Desktop: 4 columns
- Tablet: 3 columns
- Mobile: 2 columns
- Small Mobile: 1 column
- Next.js 14+ - React framework with App Router
- TypeScript - Static typing
- Tailwind CSS - CSS framework (colors used in gradients)
- Phosphor Icons - Icon library for direction indicators
- Inter & Fira Code - Google Fonts
- Node.js 18+
- npm or yarn
-
Clone the repository
git clone <repository-url> cd gradienter
-
Install dependencies
npm install # or yarn install -
Run in development mode
npm run dev # or yarn dev -
Open in browser
http://localhost:3000
π Deployment Guide
Complete guide for deploying to GitHub Pages with:
- Automated GitHub Actions deployment
- Manual deployment options
- Troubleshooting common issues
- Performance optimization tips
π οΈ Development Guide
Local development setup and best practices:
- Project structure overview
- Development workflow
- Code quality standards
- Testing and debugging
This project is configured with GitHub Actions for automatic deployment:
# Deploy automatically
git push origin mainThe workflow handles:
- β Next.js static export with enhanced caching
- β Optimized build process with linting
- β Automatic deployment to GitHub Pages
- β Build verification and error handling
π For detailed deployment instructions, see docs/DEPLOYMENT.md
# Quick manual deployment
npm run deploy:manual
# Or build only
npm run buildsrc/
βββ app/
β βββ layout.tsx # Main layout
β βββ page.tsx # Main page
β βββ globals.css # Global styles
βββ components/
β βββ GradientCard.tsx # Individual Tailwind card
β βββ GradientGrid.tsx # Cards grid
βββ lib/
β βββ utils.ts # Tailwind utility functions
βββ types/
βββ index.ts # TypeScript definitions
Renders an individual card with:
- CSS gradient generated from Tailwind colors
- 16:10 aspect ratio
- Listed Tailwind colors (e.g., blue-500, red-400)
- Complete Tailwind classes for copying
- Phosphor Icons for gradient directions
- Copy buttons for colors and classes
Organizes cards in:
- Responsive grid layout
- 100 cards per page
- Header with statistics
- Footer with Tailwind information
Generates deterministic Tailwind colors based on seed.
Creates complete Tailwind gradient configuration with:
- 2-3 deterministic Tailwind colors
- Random Tailwind direction
- Ready-to-use CSS classes
Converts Tailwind colors to valid CSS for preview.
Copies colors or classes to clipboard with feedback.
- View Gradients: Page automatically loads with 100 unique gradients using Tailwind colors
- Copy Colors: Click the copy icon next to colors to copy Tailwind color names (e.g., blue-500, red-400)
- Copy Classes: Click the copy icon next to classes to copy complete gradient classes (e.g., bg-gradient-to-r from-blue-500 to-red-400)
- Use in Project: Paste classes directly into your HTML/JSX
- Direction Icons: Phosphor Icons show gradient direction visually
npm run dev # Start development server with Turbopack
npm run build # Build for production
npm run preview # Build and serve locally
npm start # Start production server (not used for static export)npm run pre-commit # Quick test before commit (lint + types + build)
npm run test:build # Complete build test
npm run test:ci # Simulate CI environment
# Platform-specific comprehensive tests
./scripts/test-build.sh # Linux/Mac
.\scripts\test-build.ps1 # Windows PowerShellnpm run lint # Run ESLint
npm run lint:fix # Fix ESLint issues automatically
npm run type-check # Run TypeScript compiler checknpm run deploy # Build for deployment
npm run deploy:manual # Manual deployment to GitHub Pagesnpm run clean # Clean build artifacts and cache
npm run reinstall # Full dependency reinstallπ For detailed script usage, see docs/DEVELOPMENT.md
In src/app/page.tsx:
<GradientGrid cardCount={100} /> // Change the numberIn src/lib/utils.ts, add to TAILWIND_COLORS constant:
const TAILWIND_COLORS = {
// ... existing colors
newcolor: ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900', '950'],
};Modify the TAILWIND_DIRECTIONS constant in src/lib/utils.ts.
- Deterministic generation with seeded random (no hydration issues)
- Native Tailwind colors for optimal performance
- Dynamic CSS generation only for preview
- Tailwind JIT for optimized bundle
- Optimized Google Fonts loading
- Static export for fast loading
- β 100% official Tailwind colors
- β Ready-to-use classes
- β Well-typed TypeScript
- β Mobile-first design
- β Accessibility with ARIA labels
- β Performance optimized
- β Clean, commented code
- β No hydration issues
- β GitHub Pages ready
Neutrals: slate, gray, zinc, neutral, stone Reds: red, rose Oranges: orange, amber Yellows: yellow, lime Greens: green, emerald, teal Blues: cyan, sky, blue, indigo Purples: violet, purple, fuchsia Pinks: pink
Each color family includes shades: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950
This project is open source and available under the MIT License.
Developed with β€οΈ using Next.js, TypeScript and Tailwind CSS