Components
Loading preview...
Input component that spawns particle effects when typing.
npx shadcn@latest add https://21st.dev/r/tom_ui/exploding-inputimport ExplodingInput from "@/components/ui/exploding-input"
export default function ExplodingInputDemo() {
return (
<div className="flex flex-col items-center justify-center min-h-[400px] gap-4 p-8">
<label className="flex flex-col gap-2 w-full max-w-sm">
<span className="text-sm font-medium text-muted-foreground">Try typing something...</span>
<input
type="text"
placeholder="Type here..."
className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm"
/>
<ExplodingInput
content={[<span key="1">✨</span>, <span key="2">🔥</span>, <span key="3">🚀</span>]}
/>
</label>
</div>
)
}