dimah-s3v1.4.0
Components

Attachment

Reusable status rows for file previews, progress indicators, and error feedback.

FileAttachment and StatusAttachment are status row components built on top of shadcn Attachment.

Preview

Size
Orientation
State
quarterly-report.pdf2.3 MB
avatar.png175.8 KB
Preparing…

Install

Complete UI setup first — stylesheet and toaster. Then add this component:

import { FileAttachment, StatusAttachment } from "@dimah-s3/ui";

Usage

import { FileAttachment, StatusAttachment } from "@dimah-s3/ui";

// Uploading avatar row
<FileAttachment
  state="uploading"
  fileName="avatar.png"
  fileType="image/png"
  fileSize={180_000}
  percent={65}
  previewUrl="/dimah-avatar.jpg"
/>

// Generic status row
<StatusAttachment state="processing" title="Presigning URL…" />

Props

import type { FileAttachmentProps, StatusAttachmentProps } from "@dimah-s3/ui";

FileAttachment

Prop

Type

StatusAttachment

Prop

Type

On this page