my/ui

Command Palette

Search for a command to run...

All components

File Input

file-upload

Origin UI component.

responsive · 600px

Install

Same command in any shadcn project — React (Vite/CRA), Next.js, Remix, Astro, and more:

$npx shadcn@latest add https://your-domain/r/comp-30.json

Usage

import Cmp from "@/registry/origin-ui/comp-30";

export default function Demo() {
  return <Cmp />;
}

Component source

import { useId } from "react";

import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";

export default function Component() {
  const id = useId();
  return (
    <div className="*:not-first:mt-2">
      <Label htmlFor={id}>File input</Label>
      <Input
        className="p-0 pe-3 file:me-3 file:border-0 file:border-e"
        id={id}
        type="file"
      />
    </div>
  );
}

Source: Origin UI