@mesh-gradient/react
v2.0.2
Published
The SwiftUI Mesh Gradient abstraction for React
Maintainers
Readme
React Mesh Gradient
Apple-inspired animated mesh gradient component for React applications. A React wrapper around the high-performance WebGL-powered mesh gradient library.
✨ Features
- 🔄 Smooth Animations - Hardware-accelerated WebGL transitions
- 🎨 Customizable Colors - Support for up to 4 colors simultaneously
- ⚡ Static Mode - Optimized mode for static gradients
- 📱 Responsive - Automatic pause when out of viewport
- 🚀 High Performance - WebGL hardware acceleration with smart optimizations
- 🛠️ TypeScript - Full type support out of the box
- ⚛️ React-First - Built specifically for React with hooks and components
- 📦 Lightweight - Minimal bundle size impact
Documentation
Documentation website available here.
⚠️ Important Notes
- Sizing — the component renders a
<canvas>; passstyle/className(or a sized wrapper) so layout is well-defined before first paint. - WebGL — requires WebGL in the browser.
- Cleanup — handled on unmount; call
destroyon any manual instances you create elsewhere. - Performance — use
options.isStaticfor motionless gradients.
🛠️ Development
# Install dependencies
pnpm install
# Start development
pnpm dev
# Build package
pnpm build
# Lint code
pnpm lint
# From monorepo root — typecheck all packages
pnpm check-types📦 Related Packages
@mesh-gradient/core- Core mesh gradient engine@mesh-gradient/docs- Documentation site
🤝 Contributing
Contributions are welcome! Please see the contributing guide for details.
📄 License
MIT © Mikhail Mogilnikov
