mmrahmanbappi

Prompt with File Attachments

Component

About

A chat-style prompt input where users can type a message and attach files via a button or drag-and-drop, with each attached file shown as a removable chip with its size.

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

Code

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

Usage.tsx

import PromptWithAttachments from "@/components/ui/prompt-with-attachments";

export default function PromptWithAttachmentsDemo() {
  return (
    <div
      className="min-h-screen w-full flex items-center justify-center p-6"
      style={{ background: "var(--bg, #f7f7f8)" }}
    >
      <PromptWithAttachments />
    </div>
  );
}

More by mmrahmanbappi

View all
  • Web Search Indicator

    Web Search Indicator

    23
  • Prompt with Model Picker

    Prompt with Model Picker

    5
  • Editable Task Plan

    Editable Task Plan

    1
  • Thumbs Down with Reasons

    Thumbs Down with Reasons

  • Advanced Parameters Panel

    Advanced Parameters Panel

  • Code Block with Copy Button

    Code Block with Copy Button

  • Compare Answers

    Compare Answers

  • Full Chat Window

    Full Chat Window