Floating Particles
MITDrifting, 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';23export default function Demo() {4 return (5 <ShaderFloatingParticles6 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
| Prop | Tipo | Por defecto | Descripción |
|---|---|---|---|
| particleColor | string | "#ffffff" | Particle Color |
| shape | 'dot' | 'square' | 'glow' | "dot" | Shape |
| count | number | 1200 | Count |
| particleSize | number | 1.2 | Particle Size |
| softness | number | 0.1 | Softness |
| speed | number | 0.25 | Speed |
| angle | number | 90 | Angle |
| speedVariance | number | 0.3 | Speed Variance |
| angleVariance | number | 30 | Angle Variance |
| randomness | number | 0.25 | Randomness |
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.