A lightweight, zero-dependency library for generating beautiful CSS mesh gradients with TypeScript support.
npm install easy-mesh-gradientimport easyMeshGradient from "easy-mesh-gradient";
const gradient = easyMeshGradient();
document.body.style.backgroundImage = gradient;This is a Bun workspace monorepo containing:
lib/— theeasy-mesh-gradientnpm package (documentation)pages/— the website: a landing page and a visual gradient editor with multi-format exportpromo/— a promo video built with Remotion
# Install dependencies (all workspaces)
bun install
# Run the website dev server (bundles the library from source with HMR)
bun run dev
# Build the library
bun run build
# Build the website
bun run build:pages
# Lint and type-check
bun run lint
bun run type-checkThe website aliases easy-mesh-gradient to lib/src, so library changes hot-reload in the site during development.
- Website — deployed to GitHub Pages automatically on pushes to
mainthat touchpages/or the library source (workflow). - npm package — published automatically when a GitHub release is published (workflow). Auth uses npm trusted publishing (OIDC, no token secret) — the package on npmjs.com is configured to trust this repo's
publish.ymlworkflow, and provenance is generated automatically. Bumplib/package.json's version before releasing.
MIT
Created by Steven Frady
