Componentpickers0.99 KB gzipZero dependencies

FileInput

Styled file input with drop chips and selection count animation

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add file-input

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { FileInput } from "@/components/ui/file-input"; <FileInput multiple onFilesChange={() => {}} />

Source code

file-input.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxfile-input.tsx94 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface FileInputProps extends React.HTMLAttributes<HTMLElement> {  accept?: string;  multiple?: boolean;  onFilesChange?: (files: File[]) => void;  className?: string;} export function FileInput({  accept,  multiple = false,  onFilesChange,  className, ...props}: FileInputProps) {

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { FileInput } from "@/components/ui/file-input"; <FileInput />
PropTypeDescription
acceptstringConfigures accept.
multiplebooleanToggles multiple. (Default: false)
onFilesChange(files: File[]) => voidCallback invoked on files change.
classNamestringOptional Tailwind or custom CSS classes merged with component styles.