Generative AI Input
A highly polished prompt interface with expanding states, animated gradient borders, and particle explosions on submit.
Generative AI Engine
Installation
npx kinetic-ui-cli@latest add ai-generative-input
How It Works
The AIGenerativeInput component wraps a standard <textarea> in a framer-motion layout container to smoothly handle auto-expanding heights. When submitted, it renders an absolute-positioned animated gradient border to simulate "thinking", and utilizes canvas-confetti to trigger a subtle micro-interaction explosion at the exact coordinates of the submit button.
Usage Guide
1. Import the Component
Import the component into your React or Next.js page:
import { AIGenerativeInput } from "@/components/creative/ai-generative-input";
2. Implementation Example
Render the component and customize its behavior by passing props:
import { AIGenerativeInput } from "@/components/creative/ai-generative-input";
export default function Example() {
return (
<div className="w-full flex items-center justify-center p-8">
<AIGenerativeInput
onSubmit="example"
placeholder="example"
/>
</div>
);
}