Particles
MITA swarm of simulated particles that settles into the shape, filling it evenly — flat, SVG or true 3D volumes — scattering from the cursor (or chasing it), tumbling when the shape moves, and always drifting back home
Cargando shader…
Ajústalo
1
0
4000
1.5
1
0.12
0.4
Instalación
Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-particles.json
Crea components/bastard/ShaderParticles.tsx e instala shaders. Más opciones
Uso
Demo.tsx
1import ShaderParticles from '@/components/bastard/ShaderParticles';23export default function Demo() {4 return (5 <ShaderParticles6 scale={1}7 rotation={0}8 colorA="#8ec5ff"9 colorB="#ff7ad9"10 count={4000}11 size={1.5}12 particleShape="dot"13 spread={1}14 agitation={0.12}15 damping={0.4}16 />17 );18}
Props
| Prop | Tipo | Por defecto | Descripción |
|---|---|---|---|
| scale | number | 1 | Scale |
| rotation | number | 0 | Rotation |
| colorA | string | "#8ec5ff" | Rest Color |
| colorB | string | "#ff7ad9" | Excited Color |
| count | number | 4000 | Count |
| size | number | 1.5 | Size |
| particleShape | 'dot' | 'square' | 'glow' | "dot" | Shape |
| spread | number | 1 | Spread |
| agitation | number | 0.12 | Agitation |
| damping | number | 0.4 | Damping |
Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.
Créditos
Basado en Particles · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.