johuniq

AI Prompt Box

Component 154

About

An animated AI prompt input with expanding textarea, keyboard shortcuts, model selector, and file attachments.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds AI Prompt Box to your project and fits it to your theme.

Code

How AI Prompt Box is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { PromptInputBox } from "@/components/ui/ai-prompt-box";

export default function AiPromptBoxDemo() {
  return (
    <div className="relative flex h-[300px] w-full items-center justify-center px-4 md:px-8">
      <PromptInputBox
        onSend={(message, files) => {
          console.log("Message:", message);
          console.log("Files:", files);
        }}
        placeholder="Ask me anything..."
      />
    </div>
  );
}

Dependencies

More by johuniq

View all
  • Liquid Metal Button

    Liquid Metal Button

    3.2K
  • Date Wheel Picker

    Date Wheel Picker

    189
  • Animated Theme Toggle

    Animated Theme Toggle

    100
  • Joly Button

    Joly Button

    76