Particle Flow
MITThousands of drifting dust particles carried by a real incompressible fluid field the cursor stirs — drag to plow a wake and the particles ride the eddies and vortices it leaves behind, while a gentle ambient breeze keeps the whole scene breathing on its own
Cargando shader…
Ajústalo
6000
1.2
0
1
1
25
Instalación
Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-particle-flow.json
Crea components/bastard/ShaderParticleFlow.tsx e instala shaders. Más opciones
Uso
Demo.tsx
1import ShaderParticleFlow from '@/components/bastard/ShaderParticleFlow';23export default function Demo() {4 return (5 <ShaderParticleFlow6 colorA="#8ec5ff"7 colorB="#ffd98e"8 colorSpace="oklab"9 shape="streak"10 count={6000}11 size={1.2}12 trails={0}13 speed={1}14 force={1}15 swirl={25}16 />17 );18}
Props
| Prop | Tipo | Por defecto | Descripción |
|---|---|---|---|
| colorA | string | "#8ec5ff" | Rest Color |
| colorB | string | "#ffd98e" | Excited Color |
| colorSpace | 'linear' | 'oklch' | 'oklab' | 'hsl' | 'hsv' | 'lch' | "oklab" | Color Space |
| shape | 'arrow' | 'streak' | 'dot' | 'square' | 'glow' | "streak" | Shape |
| count | number | 6000 | Count |
| size | number | 1.2 | Size |
| trails | number | 0 | Trails |
| speed | number | 1 | Flow Speed |
| force | number | 1 | Cursor Force |
| swirl | number | 25 | Swirl |
Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.
Créditos
Basado en Particle Flow · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.