Prompt Input With Attachments

The AI prompt composer with an Attach file button and helper text above it, forwarding every PromptInput prop. For chat apps that accept documents or images.

src/registry/ui/prompt-input-attachments.tsx/r/prompt-input-attachments.json

Installation#

bash
npx shadcn@latest add @minidev/prompt-input-attachments

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/prompt-input-attachments.json

Usage#

tsx
import { PromptInputWithAttachments } from "@/components/ui/prompt-input-attachments"

export function Example() {
  return <PromptInputWithAttachments />
}

API reference#

PromptInputWithAttachments props
PropTypeDefault
onAttach() => void-

Also accepts every prop of PromptInput props, passed through to the root element.

Dependencies#

npm

lucide-react
All AI chat UI components for React