Quickstart
Installation
npm install shaders
Shaders is a single package regardless of your framework. No framework-specific adapters needed.
Import your components
Import from the entry point that matches your framework:
Your first shader
Wrap your effects in a <Shader> component and add children inside:
<Shader> renders a <canvas> element. The child components are visual layers — evaluated top to bottom, blended together on the GPU. The class or style you apply to <Shader> controls the canvas size and position.
Sizing the canvas
The canvas has no intrinsic size, so you must give it dimensions. Any CSS sizing works — Tailwind classes, inline styles, or a custom class:
The canvas automatically resizes when its CSS dimensions change — no manual resize calls needed.
Configuring components
Each component accepts props that control its appearance. Browse the Component Docs for full prop references, or use the Design Editor to explore and export ready-to-paste configurations:
Using with SSR frameworks
Shaders uses WebGPU, which requires a browser environment. If you're using Nuxt, Next.js, SvelteKit, or SolidStart, see the framework-specific SSR guide for your setup.
Next steps
- Composing Effects — stack and nest components for complex results
- Layout & Positioning — position the canvas in your UI
- Props & Reactivity — bind state and animate props
- Component Docs — browse all available shaders