File Input
File Input is a styled file upload control with DaisyUI styling.
Import
import { FileInput } from '@sigx/daisyui';
Basic Usage
Loading preview...
Colors
Loading preview...
Sizes
Loading preview...
Ghost
Ghost variant gives a minimal background style.
Loading preview...
Disabled
Loading preview...
With Accept Filter
Loading preview...
Props
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'md' | Size of the file input |
color | 'primary' | 'secondary' | 'accent' | 'neutral' | 'info' | 'success' | 'warning' | 'error' | — | Color variant |
ghost | boolean | false | Ghost/minimal style |
accept | string | — | Accepted file types (e.g. "image/*", ".pdf") |
multiple | boolean | false | Allow multiple file selection |
disabled | boolean | false | Disable the input |
class | string | — | Additional CSS classes |
onChange | (files: FileList | null) => void | — | Fired when files are selected |