Generator Shader Background
WebGL mesh gradient background with grain and swirl, colours from theme tokens, exported as a self-contained React component.
Choose the primitives library your project already uses. Both look the same: your theme, not the variant, controls colors, shape, type and motion.
About this feature
What it's for
- WebGL mesh gradient background with grain and swirl, colours from theme tokens, exported as a self-contained React component.
- Animated shader hero background that pauses offscreen and falls back to a CSS gradient and a PNG poster.
- Grain gradient background generator with speed, scale and swirl controls and no animation library.
Includes
- Webgl shader background
- Mesh gradient shader
- Grain gradient shader
- Swirl control
- Grain control
- Speed control
- Scale control
- Palette from theme tokens
Works with
- Radix UI and Base UI primitives (pick the one your project uses)
- React 19 and Tailwind CSS 4 in Next.js (App Router), Vite, React Router or TanStack Start, installed with the agentic-ui or shadcn CLI
- Your theme tokens, in light and dark mode
Install
Included with Agentic UI Kit (one-time license). Install needs your license key: see pricing · connect your project.
agentic-ui add generator-shader-backgroundnpx shadcn@4.17.0 add @agentic-ui/generator-shader-backgroundUsed in
A standalone component: drop it into any screen.
- Type
- Feature
- Variants
- Radix UI and Base UI
- Themes
- Light and dark
- Widths
- Preview it at desktop, tablet and mobile widths above.
- Motion
- Animated, with a reduced-motion fallback
- npm packages
- None beyond your project's React and Next.js
- Registry dependencies
lib-generator-foundation- Files
12 files
- components/agentic-ui/generator-shader-background/shader-background/shader-background-generator.tsx
- components/agentic-ui/generator-shader-background/shader-background/shader-background.tsx
- components/agentic-ui/generator-shader-background/shader-background/poster.ts
- components/agentic-ui/generator-shader-background/shader-background/generate.ts
- components/agentic-ui/generator-shader-background/shader-background/runtime-source.generated.ts
- components/agentic-ui/generator-shader-background/shader-background/mesh-math.ts
- components/agentic-ui/generator-shader-background/shared/color.ts
- components/agentic-ui/generator-shader-background/shared/png-button.tsx
- components/agentic-ui/generator-shader-background/shared/token-palette.ts
- components/agentic-ui/generator-shader-background/shared/generator-frame.tsx
- components/agentic-ui/generator-shader-background/styles/shader-background.css
- components/agentic-ui/generator-shader-background/index.ts
Related components
Generator Border Radius Blob
CSS blob shape generator with draggable border-radius handles and an eight-value border-radius output.
Details and live previewGenerator Clip Path
Clip-path generator with draggable points for polygon, circle, ellipse and inset shapes.
Details and live previewGenerator Css Loader
CSS loader generator with ring, dots, bars, pulse and orbit variants that exports CSS and a React component.
Details and live previewGenerator Easing Spring Editor
A design-system team tunes the brand ease and spring and exports them as a tokens.json override for the Stripe personality.
Details and live preview