Skip to content
Design System
GitHub

Attachment

v0.23.1Beta

One file in a list, a composer or a queue: type, name, size, progress, error with Retry, Download and Remove.

API reference

Generated from the types. Every part also takes className.

Attachment

namerequired
string
size
numberBytes.
status
"idle" | "uploading" | "done" | "error" = "done"
progress
number0–100 while uploading.
error
string
previewUrl
string
variant
"image" | "row" | "chip" = "row"
onRemove
() => void
onRetry
() => void
onDownload
() => void
leaving
booleanRemoved from the list: plays the exit, then calls onLeft. Pair with usePresenceList.
onLeft
() => void
labels
Partial<AttachmentLabels>The words it says, to translate them.