Attachment

A file chip with upload progress and remove action.

Import

import { Attachment } from "@tarve/core";

Usage

Attachment.tsx
import { Attachment } from "@tarve/core";

<Attachment
  name="design-spec.pdf"
  size="2.4 MB"
  status="uploading"
  progress={62}
  onRemove={() => console.log("removed")}
/>

Props

PropTypeDefault
name required string—
leading Child—
onRemove () => void—
progress number0
removeLabel string"Remove"
size string—
status AttachmentStatus"ready"

Common props

Shared by every component. See descriptions →

childrenhighlightidkeymotionFromonHighlightonPasteonTransitionEndrovingGroupstyle

Types

AttachmentStatus
type AttachmentStatus = "ready" | "uploading" | "error";