AhaSlides Design
v0.52.0React · Vue · Lit

Components · Data Entry

Upload

Select files by clicking a drop zone or dragging onto it — then manage them as rows or picture tiles with per-item state.

Examples

List type
State
Uploader · drop zone + file rows · uploading / done / error states · remove ✕
No files selected

API

PropTypeDefaultNotes
listtype'text' | 'picture-card'textDrop zone + file rows, or a grid of thumbnail tiles with a dashed add-box
itemsJSON list[]Managed files: [{ name, status?: 'normal'|'uploading'|'error'|'done', percent?, thumb? }]
multiplebooleanfalseAllow selecting more than one file
acceptstringMIME/type filter, e.g. "image/*"
maxcountnumberCap; the add trigger hides once items reach it
disabledbooleanfalseDims and disables the zone / add-box
changeCustomEvent<{files}>Composed event on select; read e.detail.files (File[])
removeCustomEvent<{name,index}>Composed event when an item's ✕ is clicked

Install

# .npmrc — once: point the @ahaslides-product scope at GitHub Packages
@ahaslides-product:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}   # a GitHub token with read:packages

npm i @ahaslides-product/design
import '@ahaslides-product/design/tokens.css';   // once, at the app root
import '@ahaslides-product/design/aha-uploader';   // registers <aha-uploader>

Agent feed for this component (absolute, fetchable anywhere): uploader.agent.json · uploader.md · uploader.llms.txt

When to use

When to use
  • Upload — the user brings a file in — an image, a CSV, a document
  • Input — capturing typed text, not a file
  • Colour picker — choosing a value from presets rather than importing
State what you accept in the zone copy and set `accept` to match. Drive `items[].status` from your upload lifecycle (uploading → done/error) and update `percent` as bytes land. Show the error reason near the failed row. Use `picture-card` for images, `text` for documents. Offer both click and drag — both are wired here.
Surfaces
editor dashboard settings

Spec

Zone 1px dashed border-strong #D4D4D4, radius 8, pad 24 16 · Rest text text-tertiary #8A8A8A, 14/21 · Hover / drag border + accent tint color-primary / bg-accent (motion-mid, persistent zone) · File row 1px border #E3E3E3, radius 8, file icon + name + remove ✕ · Uploading 4px pill progress track (split), color-primary fill, width animates (motion-slow) · Error item border + text color-error #F5222D on bg-negative, warning glyph · Done item check-circle glyph color-success #16C49A · Picture-card 104px tiles + dashed add-box; add-box is the trigger