A gradient design tool built with Next.js: real-time canvas preview, text and image overlays, and exports to CSS, SVG, and PNG.
- Gradient types: Linear and radial (mesh types exist in the data model for export tooling; the sidebar focuses on linear and radial).
- Color palette: Add, edit, and remove stops with the color picker.
- Canvas preview: Live rendering via HTML5 canvas (
CanvasGradientRenderer). - Controls: Angle (linear), center (radial), blur, saturation, glow, grain, contrast, brightness.
- Content: Optional text or image layers; drag to reposition on the canvas.
- Random gradient: One-click random palette and settings.
- CSS: Copy-ready gradient CSS.
- SVG: Download scalable vector output (includes mesh-style paths where applicable).
- PNG: Raster export at chosen dimensions (uses the canvas renderer).
- MP4: Placeholder in the UI (not implemented yet).
- Framework: Next.js 15 (App Router)
- Styling: Tailwind CSS
- UI: ShadCN UI
- State: Zustand
- Motion: Framer Motion (light UI transitions)
- TypeScript
- Node.js 20.x or 22.x (matches
package.jsonengines; avoids unintended major upgrades on hosts like Vercel)
git clone <repository-url>
cd shadient
npm install
npm run devOpen http://localhost:3000.
npm run build
npm start- Push this repo to GitHub, GitLab, or Bitbucket.
- Go to vercel.com and sign in.
- Add New… → Project and import the repository.
- Vercel detects Next.js automatically. Defaults are fine:
- Framework Preset: Next.js
- Build Command:
next build(ornpm run build) - Output: handled by Next.js (no manual output directory).
- Root Directory: If the app lives in a monorepo folder, set it to
shadient(or your subfolder). - Environment Variables: None required for this project unless you add API keys later.
- Click Deploy. Vercel runs
npm install(ornpm ci), thennpm run build, and serves the production build.
npm i -g vercel
cd shadient
vercel # follow prompts (link project, confirm settings)
vercel --prod # production deployment- Node version: The repo declares
"engines": { "node": ">=20.9.0" }. In Vercel → Project → Settings → General → Node.js Version, pick 20.x (or newer if you prefer and it stays compatible). - No
vercel.jsonis required for a standard Next.js app; the platform runs the Next build automatically.
| Component | Role |
|---|---|
GradientPlayground |
Shell layout: Design / Export tabs, sidebars, canvas area |
CanvasGradientRenderer |
Canvas-based gradient + text/image rendering and PNG export |
Sidebar |
Gradient type, colors, effects, content type |
ExportPanel |
CSS / SVG / PNG / MP4 (placeholder) flows |
ColorPicker / ColorPaletteManager |
Stop editing |
Zustand holds gradient config, text/image content, and design vs export mode (design | export).
This project is open source and available under the MIT License.
- Fork the project
- Create a branch (
git checkout -b feature/your-feature) - Commit and push
- Open a Pull Request
Built with Next.js.