ngx-prompt-kit

File Upload

Drag-and-drop or click-to-pick. Composes with a spartan input-group 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 an input group

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.
acceptstring — Standard accept attribute (e.g. ".jpg,.png").
disabledboolean false Disable the picker and ignore drops.
filesAddedoutput<File[]> — Fires when files are picked or dropped.
openPicker()() => void — Programmatically open the native file picker.

PkFileUploadTrigger

PropTypeDefaultDescription
classstring — Extra classes for the trigger button.

PkFileUploadContent

PropTypeDefaultDescription
classstring — Extra classes for the drag-state overlay.