Attachment
A file chip with upload progress and remove action.
Import
import { Attachment } from "@tarve/core";Usage
import { Attachment } from "@tarve/core";
<Attachment
name="design-spec.pdf"
size="2.4 MB"
status="uploading"
progress={62}
onRemove={() => console.log("removed")}
/>Props
| Prop | Type | Default |
|---|---|---|
name required | string | — |
leading | Child | — |
onRemove | () => void | — |
progress | number | 0 |
removeLabel | string | "Remove" |
size | string | — |
status | AttachmentStatus | "ready" |
Common props
Shared by every component. See descriptions →
childrenhighlightidkeymotionFromonHighlightonPasteonTransitionEndrovingGroupstyleTypes
type AttachmentStatus = "ready" | "uploading" | "error";