FileInput
A drop zone that also opens the file picker, with one row per file that shows its progress or why it was rejected.
When to use
Section titled “When to use”- Use it for task attachments, knowledge uploads and avatar images. In the chat composer, the attach
ActionIconopens the same picker without the zone.
What the consumer provides
Section titled “What the consumer provides”accepttypes and limits. State them in the second line of the zone: “PDF, text, images, audio. Up to 8 files, 25 MB each.”onDrop. A list with one row per file: name, size or progress, and a cancel or remove action.
Behaviour
Section titled “Behaviour”- Zone: dashed
border-strong,radius-lg, caret icon inemerald-deep. Hover and focus turn the edgeemerald-deeponsurface-selected. A file dragged over the zone makes the edge solid. A rejected type turns itdangerondanger-softwhile it hovers. - Rows:
surface-100,border,radius-md. A 4pxProgressshows while the file uploads, then “Done” insuccess. A rejected row says how to fix it. - Keyboard: the zone is focusable. Enter or Space opens the picker.
Tokens
Section titled “Tokens”surface-100, surface-selected, border-strong, border, emerald-deep, danger, danger-soft, success, ink, ink-muted, radius-lg, radius-md.
Mantine
Section titled “Mantine”@mantine/dropzone: <Dropzone accept={[MIME_TYPES.pdf, …]} maxSize={25 * 1024 ** 2} maxFiles={8} radius="lg"> with Dropzone.Accept, Dropzone.Reject, Dropzone.Idle.