Spelte

Open Github

Exploding Input

Input component that spawns particle effects when typing.

Installation

pnpm dlx shadcn-svelte@latest add https://spelte.dev/r/exploding-input.json

Props

PropTypeDefaultDescription
contentstring[][]Content to render as particles
countnumber1Particles spawned per keystroke (1–5)
direction{ horizontal, vertical }{ horizontal: 'center', vertical: 'top' }Particle direction
gravitynumber0.7Gravity (-1 to 1, negative = upward)
durationnumber3Particle lifetime in seconds
scale{ value, randomize, randomVariation }{ value: 1 }Scale config
rotation{ value, animate }{ value: 0 }Rotation config
classstringAdditional CSS classes

Inspiration