Componentpickers0.99 KB gzipZero dependencies
FileInput
Styled file input with drop chips and selection count animation
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add file-inputOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { FileInput } from "@/components/ui/file-input"; <FileInput multiple onFilesChange={() => {}} />Source code
file-input.tsx + 1 helperZero 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 />| Prop | Type | Description |
|---|---|---|
| accept | string | Configures accept. |
| multiple | boolean | Toggles multiple. (Default: false) |
| onFilesChange | (files: File[]) => void | Callback invoked on files change. |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |