Open-source, production-focused shader backgrounds for React and Next.js.
A collection of shader components that uses Paper Design shaders with shadcn-compatible registry.
- Docs: https://pixel.devsethi.site/docs
- Installation guide: https://pixel.devsethi.site/docs/installation
- Production-ready shader components with practical props and defaults
- Built on top of
@paper-design/shaders-reactfor high-quality GLSL shader effects - Copy-paste and CLI install flow via shadcn registry JSON
- Category-based gallery with search and favorites support
- Documentation pages for each shader with preview, install tabs, and prop tables
- Next.js App Router architecture with static and dynamic docs routes
Pixel uses Paper Design's shader runtime (@paper-design/shaders-react) as the rendering engine behind each visual background.
What this gives you:
- Performant WebGL-based shader rendering with a React-first API
- Rich visual effects without writing raw shader boilerplate in each app
- Component-driven props that map cleanly to docs and registry metadata
In this project, each shader component is wrapped and standardized so users can install it quickly via the registry and customize it through documented props.
Pixel currently ships 10 shader components:
- ocean-wave
- sunset-glow
- aurora-dream
- mesh-gradient
- cosmic-dust
- neon-pulse
- particle-field
- geometric-pattern
- grid-morph
- glitch-wave
Registry JSON files are generated in public/r for CLI consumption.
- Framework: Next.js 16 (App Router) + React 19 + TypeScript
- Styling: Tailwind CSS v4 + shadcn/ui component patterns
- Animation/UI: motion, Radix UI primitives, vaul (drawer), sonner (toast)
- Shader runtime: @paper-design/shaders-react
- State: zustand, jotai
- Tooling: pnpm, ESLint (Next core web vitals + TypeScript), PostCSS
Core ecosystem packages used by the project include:
next,react,react-dom,typescript@paper-design/shaders-reacttailwindcss,class-variance-authority,clsx,tailwind-mergezustand,jotaiframer-motion/motion@radix-ui/*,vaul,sonner
Top-level runtime flow:
- Home page renders hero + shader gallery.
- Docs pages render installation and per-shader documentation.
- Registry endpoint returns JSON used by shadcn CLI.
- Registry generator script emits static JSON files under public/r.
Important directories:
- src/app: App Router pages, layouts, metadata, sitemap, robots, API routes
- src/components/shaders: Shader components and shader resolver/index
- src/components/gallery: Gallery UI and shader cards
- src/components/docs: Docs UI blocks, demos, install snippets, props tables
- src/lib/shaders-config.ts: Canonical shader metadata (id, category, props, defaults)
- src/lib/registry.ts: Registry JSON and code generation logic
- src/scripts/generate-registry.ts: Static registry generation script
- public/r: Generated registry files, one per shader
- Node.js 20+
- pnpm 9+
pnpm installpnpm devOpen http://localhost:3000.
- pnpm dev: Start development server
- pnpm lint: Run ESLint checks
- pnpm generate-registry: Generate public/r JSON files from shader config
- pnpm build: Generate registry, then run production Next.js build
- pnpm start: Start production server
Pixel supports shadcn add from a hosted JSON endpoint.
This means users can install a shader component directly from your registry URL, just like any other shadcn-compatible source.
Example:
npx shadcn add https://pixel.devsethi.site/r/ocean-wave.jsonYou can also target your local dev server while testing registry output:
npx shadcn add http://localhost:3000/r/ocean-wave.jsonTwo delivery paths exist:
- Dynamic endpoint: src/app/api/r/[name]/route.ts
- Static files: public/r/*.json generated at build time
Caching and CORS headers are configured for registry responses.
Registry JSON is generated from a single source of truth in src/lib/shaders-config.ts, ensuring docs, gallery metadata, and install artifacts stay aligned.
Pixel is designed to work with the shadcn CLI registry model:
- Each shader has a dedicated JSON artifact under
/r/<shader>.json - Installation snippets in docs map to the same generated artifact
- Registry generation is automated and repeatable via script
- Dynamic API and static file outputs provide flexibility for hosting strategies
- Create shader component in src/components/shaders.
- Register the shader in src/components/shaders/index.tsx.
- Add metadata and props to src/lib/shaders-config.ts.
- Ensure registry generation works:
pnpm generate-registry- Verify docs route and preview:
pnpm dev- Built for Next.js deployment targets (Vercel or self-hosted Node runtime)
- Production build includes prebuild registry generation
- App defines robots, sitemap, metadata, and PWA manifest routes
- Supports reduced motion preference in global styles
- Uses dynamic shader component loading for heavy visual modules
- Recent hero update prioritizes earlier LCP text paint before shader mount
Contributions are welcome.
Suggested contribution flow:
- Fork repository
- Create feature branch
- Run lint and build locally
- Open pull request with clear summary and screenshots for UI changes
Before opening PRs, please validate:
pnpm lint
pnpm buildThis repository includes standard open-source governance files:
- LICENSE
- CONTRIBUTING.md
- CODE_OF_CONDUCT.md
- SECURITY.md
MIT
Created by Dev Sethi.