
Menubar Component
Components
An animated attachment component with interactive file cards, upload progress, image previews, drag-and-drop reordering, and responsive feedback for file-management workflows.
Attachment shows selected files as cards with thumbnails, file details, upload progress, and contextual actions. New files animate in, progress rolls and shimmers while uploading, and failed uploads shake and offer a retry. Users can reorder items by dragging, open larger previews, and remove files while neighbouring cards slide smoothly into place.
Use it when files are central to a task, such as onboarding, project submissions, design reviews, and support requests, where users need to see what they attached and whether each file is ready.
Choose image thumbnails, document chips, or note cards, and set groups to wrap or stay in one row. Motion options include animated entry and exit, stagger, fly-in from the drop position, an animated dropzone border, rolling percentages, shimmer text, tracing borders, progress fills, error shake, hover zoom, scroll tilt, and drag reordering.
An agency onboarding portal can collect brand assets, references, and documents in one place. Clients drag files in, watch each card show its progress, and retry any failure without restarting the whole submission.
A creative review tool can display reference images as thumbnails that reviewers expand, reorder into the sequence they should be discussed, and annotate with short notes.
A support platform can let customers attach screenshots and logs to a ticket, with clear error states when a file is too large or fails to upload.
For a single straightforward file, a native file input is simpler when previews and upload states aren’t needed.
It isn’t a digital asset manager. Large libraries with folders, search, tagging, permissions, and version history need a dedicated system.
A visible card doesn’t mean a file is stored securely, and very large or long transfers may need a dedicated upload manager with pause, resume, and queues.
Keep entrances, hover effects, and layout transitions light, and scope progress updates to the affected card. Avoid decoding full-size images for thumbnails, release preview URLs when they are no longer needed, and stop shimmer, tilt, and tracing once they no longer apply.
Use a labelled file input, name each action’s target (“Remove project-brief.pdf”), and announce progress and errors without reading out every percentage. Hover-revealed actions must work on keyboard focus, and reordering needs a keyboard alternative to dragging. On mobile, keep filenames and controls visible with comfortable tap targets, and with reduced motion simplify entrances, shake, tilt, and zoom.
| Prop | Type | Default | Description |
|---|---|---|---|
theme | string | valorant | Colour palette. The drop zone, border trace and progress take its primary colour. |
mode | string | dark | Light or dark version of the chosen palette. |
animateEnter | boolean | true | New files scale up and fade into the list. |
stagger | number | 0.08 | Gap between files added together, in seconds. |
flyIn | boolean | true | Dropped files fly from where they were dropped into the list. |
animatedBorder | boolean | true | The drop zone's border marches while a file is dragged over it. |
animateExit | boolean | true | Removed files shrink out and the rest slide together. |
rollingNumbers | boolean | true | Upload percentages roll to each new number. |
shimmerText | boolean | true | A light sweeps across the file name while it uploads. |
borderTrace | boolean | true | A line traces around the card as it uploads. |
fill | boolean | true | Image cards fill up with the picture as they upload. |
fillDirection | string | bottom-to-top | Which way the image fill grows. Needs Card fill on. |
shakeOnError | boolean | true | A file that fails shakes: a random failure, or one that is too big or the wrong type. |
revealAction | boolean | true | The remove button appears only on hover or focus (pointer devices). |
zoomOnHover | boolean | true | Image previews zoom in slightly on hover. |
blurUntilLoaded | boolean | true | Image previews stay blurred while they upload and process. |
expandable | boolean | true | Clicking an image opens it in a large preview. |
reorder | boolean | true | Drag files sideways to reorder them. |
tiltOnScroll | boolean | false | Cards lean as the row is scrolled sideways. Needs Wrap off. |
wrap | boolean | true | Files wrap onto new lines instead of scrolling in one row. |
simulateFailures | boolean | true | Some uploads fail at random, to preview the error state. |
maxSizeMB | number | 5 | Files bigger than this show an error card instead of uploading. |
accept | string | any | Which files can be added. Others show an error card, and the file picker only offers these. |
Attachment is an animated React component that displays files as interactive cards with image previews, upload progress, error states, and file-management controls, plus grouped attachments and compact note items.
A native file input only selects files. Attachment adds a visual collection where users inspect files, monitor progress, handle errors, preview images, and reorder items.
Yes. Files can be added through a file-selection control or a dropzone, and an animated border shows when the dropzone is ready.
No. It provides the file interface and visual states. Transfer, validation, storage, progress reporting, and error recovery need server integration.
Yes. Groups support drag reordering, with neighbouring items shifting to make room. Both values and onReorder must be supplied.
It can be, with labelled upload controls, keyboard-operable file actions, readable progress and error messages, and an alternative to pointer-only reordering. Verify these in the shipped component.
Need a custom effect? Tell us what to create.