Installing Components
Install any shader component using the shadcn CLI:
$ pnpm dlx shadcn@latest add https://shadercn.vercel.app/r/component-name.json
Using a Component
After installation, import it from your UI folder:
import { ShaderBackground } from "@/components/ui/shader-background";
export function Hero() {
return (
<div className="relative h-screen">
<ShaderBackground className="absolute inset-0" />
<div className="relative z-10">
<h1>Your content here</h1>
</div>
</div>
);
}Customizing Props
Every shader component exposes its visual parameters as props:
<ShaderBackground
speed={0.5}
color1="#ff0000"
color2="#0000ff"
intensity={0.8}
/>Adding to Your Project
1. Install dependencies
pnpm add vgpu
pnpm add -D @webgpu/types2. Install the component
$ pnpm dlx shadcn@latest add https://shadercn.vercel.app/r/component-name.json
3. Use it
import { ShaderComponent } from "@/components/ui/shader-component";
export function MyPage() {
return <ShaderComponent />;
}