WebGPU silk mesh. Three colors, warp, grain. Animation on by default.
pnpm dlx shadcn@latest add @spaceui/components-shader-silk-gradientDepends on vgpu. WebGPU required.
import { SilkGradient } from '@/components/shader/silk-gradient'
export default function SpaceUI() {
return <SilkGradient className="h-96 w-full" color1="#4c9bff" color2="#1f4fd8" color3="#0a1a4a" animate grain />
}| Prop | Type | Default | Description |
|---|---|---|---|
color1 | string | required | Light silk |
color2 | string | required | Mid warp |
color3 | string | required | Dark blend |
speed | number | 1 | Animation speed |
animate | boolean | true | Play / pause |
grain | boolean | true | Film grain |
className | string | — | Canvas class |
pnpm dlx shadcn@latest add @spaceui/components-spaceui-ui