Customization
Custom UI
Build bespoke upload interfaces using headless hooks and custom components.
Combine @dimah-s3/react hooks with your own components or custom shadcn primitives.
Preview
Example: Headless Avatar Uploader
"use client";
import { useUpload } from "@dimah-s3/react";
import { Button } from "@/components/ui/button";
export function CustomAvatarPicker() {
const upload = useUpload({
route: "avatar",
noDrag: true,
noClick: true,
});
return (
<div className="flex items-center gap-4">
<input {...upload.getInputProps()} />
<Button type="button" onClick={() => upload.open()}>
{upload.isUploading
? `Uploading ${upload.progress.percent}%`
: "Select Avatar"}
</Button>
</div>
);
}Frequently asked questions
upload.progress exposes detailed progress metrics:
const { progress } = useUpload({ route: "avatar" });
console.log(progress.loaded, progress.total, progress.percent);