Components
Attachment
Reusable status rows for file previews, progress indicators, and error feedback.
FileAttachment and StatusAttachment are status rows built on shadcn Attachment.
Preview
Size
Orientation
State
Install
Complete UI setup first — stylesheet and toaster. Then add this component:
import { FileAttachment, StatusAttachment } from "@dimah-s3/ui";Usage
"use client";
import { useUpload } from "@dimah-s3/react";
import { UploadButton } from "@dimah-s3/ui";
// Don't use FileAttachment or StatusAttachment directly.
// Upload, download, and delete components already render them.
export function AvatarUploader() {
const upload = useUpload({
route: "avatar",
});
return <UploadButton upload={upload} />;
}For custom chrome, compose shadcn Attachment with the headless hooks — see Custom UI.
Props
import type { FileAttachmentProps, StatusAttachmentProps } from "@dimah-s3/ui";FileAttachment
Prop
Type
StatusAttachment
Prop
Type