Component libraryAttachment tray
Attachment tray
ProReview queued files, progress and errors before sending a message.
npx shadcn@latest add @tidal-pro/attachment-trayInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/attachment-tray.css, components/ui/status-badge.css, components/ui/progress.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
Required label and consumer-owned attachments with unique ids, filename, status (queued, uploading, ready, error), optional sizeText/typeText/statusLabel/progress/error, native remove/retry button props and refs. Optional remove/retry callbacks receive the item and native event; caller button handlers run first and prevention cancels the callback. Root and per-item disabled states normalize with native disabled/aria-disabled; the consumer header-actions slot becomes inert while the root is disabled. Optional emptyMessage, actions, headingLevel and native section attrs/ref. Progress and Status badge are composed from accepted components. Identical filenames remain distinct by id. The consumer owns upload, retry, removal, focus after an accepted mutation and message submission. No file reads, uploads, storage or requests occur.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.