ngx-prompt-kit

File Upload

Drag-and-drop or click-to-pick. Composes with PromptInput so file chips render above the textarea, the attach action wires to the picker, and a full-page drop overlay catches files dropped anywhere.

Examples

File Upload with Prompt Input

Drop a file anywhere on the page or click the paperclip. Submitted files clear after a fake 2-second send.

Installation

Add the file-upload component (and the cn() utility) to your project.

ng generate ngx-prompt-kit:file-upload

Component API

PkFileUpload

PropTypeDefaultDescription
multipleboolean true Allow selecting multiple files at once.
acceptstringStandard accept attribute (e.g. ".jpg,.png").
disabledboolean false Disable the picker and ignore drops.
filesAddedoutput<File[]>Fires when files are picked or dropped.
openPicker()() => voidProgrammatically open the native file picker.

PkFileUploadTrigger

PropTypeDefaultDescription
classstringExtra classes for the trigger button.

PkFileUploadContent

PropTypeDefaultDescription
classstringExtra classes for the drag-state overlay.