AI ComponentsAI Input
AI Input
A sleek AI input component featuring an animated Siri orb that morphs between dock and input states. Includes smooth spring animations, click-outside behavior, and keyboard shortcuts (⌘+Enter). Perfect for AI chat interfaces with elegant micro-interactions.
Code
1
Install with shadcn
Terminal
npx shadcn@latest add @smoothui/ai-inputOr install the demo
Terminal
npx shadcn@latest add @smoothui/ai-input-demoHow to use
Demo.tsx
"use client"
import { MorphSurface } from "@/components/smoothui/ui/AiInput"
export default function AiInputDemo() {
return (
<div className="flex flex-col items-center space-y-8">
{/* Main Demo */}
<div className="relative">
<MorphSurface />
</div>
</div>
)
}
Props
| Prop | Type | Default |
|---|---|---|
| onSubmit? | (message: string) => void | - |
| placeholder? | string | Ask me anything... |
| disabled? | boolean | |
| loading? | boolean | |
| expandable? | boolean | |
| success? | boolean | |
| className? | string | - |
| children? | React.ReactNode | - |