Package Options
Vanilla JavaScript
@paper-design/shaders - Use with vanilla JS, Vue, Svelte, or any frameworkReact
@paper-design/shaders-react - React components with hooks supportReact Installation
If you’re using React, install the React package which includes the core shaders as a dependency:React Requirements
The React package requires:- React 18 or 19
@types/react18 or 19 (optional, for TypeScript users)
The React package automatically includes
@paper-design/shaders as a dependency, so you don’t need to install both.Vanilla JavaScript Installation
For vanilla JavaScript or other frameworks (Vue, Svelte, etc.), install the core package:Version Pinning
We recommend pinning your dependency to a specific version:package.json
Package Details
@paper-design/shaders-react
- Current Version: 0.0.71
- Bundle Type: ES Module
- TypeScript: Full type definitions included
- Dependencies:
@paper-design/shaders@0.0.71 - Peer Dependencies:
react@^18 || ^19
@paper-design/shaders
- Current Version: 0.0.71
- Bundle Type: ES Module
- TypeScript: Full type definitions included
- Dependencies: Zero
- Side Effects: None
TypeScript Support
Both packages include full TypeScript type definitions out of the box. No additional@types packages are needed.
Verify Installation
After installation, verify that the package is correctly installed:CDN Usage (Not Recommended)
While Paper Shaders is designed for bundler-based workflows, you can import it from a CDN:Next Steps
Quick Start
Create your first shader in minutes
React Guide
Learn how to use shaders in React
Troubleshooting
Module not found errors
Module not found errors
Ensure your bundler is configured to handle ES modules. Most modern bundlers (Vite, Next.js, Create React App) handle this automatically.
TypeScript errors
TypeScript errors
Make sure you’re using TypeScript 4.5 or later. The package includes its own type definitions, so no
@types packages are needed.React version conflicts
React version conflicts
Paper Shaders requires React 18 or 19. Check your
package.json to ensure compatibility:Build errors with older bundlers
Build errors with older bundlers
If you’re using an older bundler that doesn’t support ES modules well, try upgrading to the latest version of your bundler or switching to a modern alternative like Vite.
