Skip to content

No.517 · Micro-animations

Download Tray

The arrow drops into the tray while a ring fills with real progress; when it's done a tick appears and the tray bounces.

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

Written for the variant you picked above: Paper

Build a round download button (56px) with a progress ring. Its icon is an arrow over an open tray. On press, the action is called with a progress callback: while it runs, the arrow repeatedly drops into the tray (translate −6px → 5px, fading in and out, 900ms loop) and a ring around the button (SVG circle, stroke-dashoffset from the circumference) fills with the reported progress. When it resolves, the ring turns green and full, the arrow is replaced by a tick drawing itself in, and the tray does a quick squash-and-stretch bounce from the bottom; after 2.2s it resets. Live progress is announced politely ("Downloading 40%", "Download complete"). The demo fakes the progress. Selected variant — Paper (paper): Apply the paper theme. Where the brief above gives no colour values for it, choose a restrained paper palette with text at 4.5:1 contrast or better. Keep the geometry, states and motion described above unchanged. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Click, tap, Space or Enter to start; the button shows progress and confirms when done. Motion: Arrow drop loop 900ms; ring follows real progress; tick 360ms; tray bounce 520ms; reset after 2.2s. Accessibility: aria-busy while downloading and a label that changes to "Downloaded"; progress is announced in a status region. Reduced motion removes the looping drop and bounce. Responsive behavior: A fixed-size control that sits inline wherever it's placed; nothing depends on screen width. Touch: Works the same on touch; there's no hover-only behaviour. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

Notes

Interaction
Click, tap, Space or Enter to start; the button shows progress and confirms when done.
Motion
Arrow drop loop 900ms; ring follows real progress; tick 360ms; tray bounce 520ms; reset after 2.2s.
Accessibility
aria-busy while downloading and a label that changes to "Downloaded"; progress is announced in a status region. Reduced motion removes the looping drop and bounce.
Responsive
A fixed-size control that sits inline wherever it's placed; nothing depends on screen width.
On touch
Works the same on touch; there's no hover-only behaviour.