File Input
The File Input component provides a reusable pattern for fileinput in the interface.
Fileinput by drag and drop, single file
Fileinput by drag and drop, multiple files
Fileinput with minimum number of files
API
| Parameter | Default | Type | Description |
|---|---|---|---|
|
description
|
string | - | |
|
name
|
files | string | - |
|
accept
|
audio/*,video/*,image/* | string | - |
|
multiple
|
false | boolean | - |
|
preview
|
false | boolean | - |
|
maxSize
|
null | string|integer|null | - |
|
uploadErrorMessage
|
null | ?string | - |
|
uploadErrorMessageMinFiles
|
null | ?string | - |
|
icon
|
file_upload | string | - |
|
required
|
false | boolean | - |
|
filesMax
|
1 | integer | - |
|
filesMin
|
0 | integer | - |
|
label
|
string | - | |
|
buttonLabel
|
Select file | string | - |
|
buttonRemoveLabel
|
Remove file | string | - |
|
buttonDropLabel
|
Drop files here | string | - |
|
allowedFileTypesLabel
|
Allowed files: | string | - |
|
fileTypeVideosLabel
|
Videos | string | - |
|
fileTypeImagesLabel
|
Images | string | - |
|
fileTypeAudioLabel
|
Audios | string | - |
|
maximumSizeLabel
|
Maximum size | string | - |
CSS API
| Variable | Default | Type | Values | Description |
|---|---|---|---|---|
|
--c-fileinput--border-radius
|
var(--border-radius) | range | - | Border Radius |
|
--c-fileinput--border-width
|
var(--border-width) | range | - | Size |
|
--c-fileinput--space
|
var(--space) | range | - | Base spacing unit. Used for padding and margin inside components. |
|
--c-fileinput--color--surface
|
var(--color--surface) | color | - | Surface |
|
--c-fileinput--color--danger
|
var(--color--danger) | color | - | Danger |
|
--c-fileinput--color--success
|
var(--color--success) | color | - | Success |
|
--c-fileinput--font-size-90
|
var(--font-size-90) | range | - | One step below base in the type scale. |
|
--c-fileinput--font-size-80
|
var(--font-size-80) | range | - | Two steps below base in the type scale. |
|
--c-fileinput--color--surface-border
|
var(--color--surface-border) | color | - | Manual companion token for borders on surface elements. |
|
--c-fileinput--shadow-color
|
var(--shadow-color) | rgba | - | Shadow Color |
|
--c-fileinput--shadow-amount
|
var(--shadow-amount) | range | - | Multiplier for elevation shadows. 0 = none, 1 = default. |
|
--c-fileinput--corner-shape
|
var(--corner-shape) | select | square, round, squircle, circular, bevel, scoop | Corner Shape |
|
--c-fileinput--color--surface-alt
|
var(--color--surface-alt) | color | - | Manual companion token for subtle surface backgrounds. |
|
--c-fileinput--color--surface-contrast-muted
|
var(--color--surface-contrast-muted) | color | - | Derived muted contrast for text and icons on surface backgrounds. |
|
--c-fileinput--color--danger-border
|
var(--color--danger-border) | color | - | Manual companion token for danger border and emphasis states. |
|
--c-fileinput--color--danger-contrast
|
var(--color--danger-contrast) | color | - | Danger Contrast |