Component docs
Loading
"use client";
import { FileUpload } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
actions | ReactNode | — | Action slot (buttons or links). |
preview | ReactNode | — | — |
state | "idle" | "dragging" | "complete" | "error" | — | — |
accept | string | — | — |
description | ReactNode | — | Supporting text. |
disabled | boolean | — | Disables interaction. |
dragActive | boolean | — | — |
inputLabel | string | — | — |
multiple | boolean | — | — |
onValueChange | (files: File[]) => void | — | Called with the new value (only when it changes). |
actionsReactNode
Action slot (buttons or links).
previewReactNode
state"idle" | "dragging" | "complete" | "error"
acceptstring
descriptionReactNode
Supporting text.
disabledboolean
Disables interaction.
dragActiveboolean
inputLabelstring
multipleboolean
onValueChange(files: File[]) => void
Called with the new value (only when it changes).
Other props are passed to the root element (HTMLAttributes<HTMLLabelElement>), including className, style, id and aria-* attributes.
const preview = <Image alt="" src="/images/chart.png" />;
const actions = <Button size="sm">Remove</Button>;
<FileUpload state="complete" preview={preview} actions={actions}>Upload</FileUpload>