Docs/Fondos

Particle Flow

MIT

Thousands 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';
2
3export default function Demo() {
4 return (
5 <ShaderParticleFlow
6 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

PropTipoPor defectoDescripción
colorAstring"#8ec5ff"Rest Color
colorBstring"#ffd98e"Excited Color
colorSpace'linear' | 'oklch' | 'oklab' | 'hsl' | 'hsv' | 'lch'"oklab"Color Space
shape'arrow' | 'streak' | 'dot' | 'square' | 'glow'"streak"Shape
countnumber6000Count
sizenumber1.2Size
trailsnumber0Trails
speednumber1Flow Speed
forcenumber1Cursor Force
swirlnumber25Swirl

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.