dimah-s3v1.4.0
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

On this page