File Input#

File Input is a styled file upload control with DaisyUI styling.

Import#

TSX
import { FileInput } from '@sigx/daisyui';

Basic Usage#

TSX
Loading preview...

Colors#

TSX
Loading preview...

Sizes#

TSX
Loading preview...

Ghost#

Ghost variant gives a minimal background style.

TSX
Loading preview...

Disabled#

TSX
Loading preview...

With Accept Filter#

TSX
Loading preview...

Props#

PropTypeDefaultDescription
size'xs' | 'sm' | 'md' | 'lg' | 'xl''md'Size of the file input
color'primary' | 'secondary' | 'accent' | 'neutral' | 'info' | 'success' | 'warning' | 'error'Color variant
ghostbooleanfalseGhost/minimal style
acceptstringAccepted file types (e.g. "image/*", ".pdf")
multiplebooleanfalseAllow multiple file selection
disabledbooleanfalseDisable the input
classstringAdditional CSS classes
onChange(files: FileList | null) => voidFired when files are selected