Docs/Formas

Particles

MIT

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

PropTipoPor defectoDescripción
scalenumber1Scale
rotationnumber0Rotation
colorAstring"#8ec5ff"Rest Color
colorBstring"#ff7ad9"Excited Color
countnumber4000Count
sizenumber1.5Size
particleShape'dot' | 'square' | 'glow'"dot"Shape
spreadnumber1Spread
agitationnumber0.12Agitation
dampingnumber0.4Damping

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.