Docs/Fondos

Floating Particles

MIT

Drifting, twinkling motes — thousands of real simulated particles floating in a shared heading with per-particle wander and variance, and a cursor that stirs the field with a gust that settles back into the drift

Cargando shader…

Ajústalo

1200
1.2
0.1
0.25
90
0.3
30
0.25

Instalación

Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-floating-particles.json

Crea components/bastard/ShaderFloatingParticles.tsx e instala shaders. Más opciones

Uso

Demo.tsx
1import ShaderFloatingParticles from '@/components/bastard/ShaderFloatingParticles';
2
3export default function Demo() {
4 return (
5 <ShaderFloatingParticles
6 particleColor="#ffffff"
7 shape="dot"
8 count={1200}
9 particleSize={1.2}
10 softness={0.1}
11 speed={0.25}
12 angle={90}
13 speedVariance={0.3}
14 angleVariance={30}
15 randomness={0.25}
16 />
17 );
18}

Props

PropTipoPor defectoDescripción
particleColorstring"#ffffff"Particle Color
shape'dot' | 'square' | 'glow'"dot"Shape
countnumber1200Count
particleSizenumber1.2Particle Size
softnessnumber0.1Softness
speednumber0.25Speed
anglenumber90Angle
speedVariancenumber0.3Speed Variance
angleVariancenumber30Angle Variance
randomnessnumber0.25Randomness

Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.

Créditos

Basado en Floating Particles · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.