File Input

File Input: Accessible file input with drag-and-drop target, file size badge, and clear trigger. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.

Install File Input

npx motion-ui-skill add file-input

Components install as source into your project. The interactive page also includes preview, code, documentation and install tabs.

Dependencies

  • clsx
  • lucide-react
  • motion
  • next
  • react
  • tailwind-merge

Source files

File Input

Component from Motion UI: file-input

Install

npx motion-ui-skill add file-input

Dependencies

  • clsx
  • lucide-react
  • motion
  • next
  • react
  • tailwind-merge

Usage

"use client";

import FileInput from "@/components/craft/file-input";

export function Example() {
  return (
    <div className="p-6">
      <FileInput />
    </div>
  );
}

Browse this category