Components
Renders an area for uploading files with a native HTML file input, handling click and drag events with an onChange handler for the uploaded file data. Supports a separate Trigger element, custom children composition, inline rendering and a headless variant with render props exposing the drag-over state.
npx @21st-dev/cli add reshaped/reshaped-file-uploadLoading preview...
import { Button, Reshaped } from "reshaped/bundle";
import FileUpload from "@/components/ui/reshaped-file-upload";
export default function Demo() {
return (
<Reshaped theme="slate">
<div style={{ maxWidth: 480, width: "100%", margin: "0 auto", padding: 24 }}>
<FileUpload name="file" inline variant="headless">
{(props) => <Button highlighted={props.highlighted}>Click to upload</Button>}
</FileUpload>
</div>
</Reshaped>
);
}
Loading preview...
Loading preview...
Loading preview...
Loading preview...