reshaped

Reshaped File upload

Component

About

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.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Reshaped File upload to your project and fits it to your theme.

Code

How Reshaped File upload is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { Icon, Reshaped, View } from "reshaped/bundle";
import FileUpload from "@/components/ui/reshaped-file-upload";

const MicIcon = () => (
  <svg
    viewBox="0 0 24 24"
    fill="none"
    stroke="currentColor"
    strokeWidth="2"
    strokeLinecap="round"
    strokeLinejoin="round"
  >
    <path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" />
    <path d="M19 10v2a7 7 0 0 1-14 0v-2" />
    <line x1="12" y1="19" x2="12" y2="23" />
    <line x1="8" y1="23" x2="16" y2="23" />
  </svg>
);

export default function Demo() {
  return (
    <Reshaped theme="slate">
      <div style={{ maxWidth: 480, width: "100%", margin: "0 auto", padding: 24 }}>
        <FileUpload name="file">
          <View gap={2}>
            <Icon svg={MicIcon} size={6} />
            Drop files to attach
          </View>
        </FileUpload>
      </div>
    </Reshaped>
  );
}

Dependencies

More by reshaped

View all
  • Reshaped Toast

    Reshaped Toast

    9
  • Reshaped Calendar

    Reshaped Calendar

    9
  • Reshaped Progress indicator

    Reshaped Progress indicator

    7
  • Reshaped Context menu

    Reshaped Context menu

    7
  • Reshaped Checkbox

    Reshaped Checkbox

    7
  • Reshaped Autocomplete

    Reshaped Autocomplete

    7
  • Reshaped Pagination

    Reshaped Pagination

    6
  • Reshaped Carousel

    Reshaped Carousel

    6