AsterUIDocsv1.0.2

Docs / Component reference

FileUpload

Choose a file or drop it on the target. The component manages the selection and the caller handles sending the file.

File upload example

Install

sh
npx @fierst/ui@1.0.2 add file-upload

Registry dependencies: theme, icon. Package dependencies: @lucide/icons.

Exports from ./ui/file-upload: FileUpload.

Download the registry source for file-upload 1.0.2.

API contracts

ts
export function* FileUpload(
  props: {
    label?: string;
    accept?: string;
    multiple?: boolean;
    maxSizeBytes?: number;
    hint?: string;
    onChange?: (files: File[]) => void;
    class?: string;
  },
  ctx: Ctx,
)