dimah-s3v1.4.0
Components

Upload Button

File picker button for single- or multi-file uploads with inline status and toast support.

UploadButton connects directly to a useUpload hook and triggers the native OS file picker.

Preview

Install

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

import { UploadButton } from "@dimah-s3/ui";

Usage

"use client";

import { useUpload } from "@dimah-s3/react";
import { UploadButton } from "@dimah-s3/ui";

export function AvatarUploader() {
  const upload = useUpload({
    route: "avatar",
  });

  return <UploadButton upload={upload} label="Choose Avatar" />;
}

Props

import type { UploadButtonProps } from "@dimah-s3/ui";

Prop

Type

Frequently asked questions

On this page