Skip to content
LoidoltTheme 0.11.1
Svelte 5

Component

FileInput

A file picker in the system's input clothes — Input cannot be `type="file"`.

import { FileInput } from '@loidolt/theme-svelte';

Example

Notes

  • onFiles fires only when at least one file is chosen; onchange still forwards.

Props

Generated from the component source, so it cannot drift from the implementation.

FileInput props
PropTypeDefaultNotes
accept string—
boxed booleanfalseDraws the full box instead of the default underline, like Input.
class string—
disabled booleanfalse
multiple booleanfalse
onFiles (files: FileList) => void—Fired when the user picks at least one file.
ref bindableHTMLInputElement | nullnull

Plus the attributes of Omit<HTMLInputAttributes, 'type' | 'value' | 'files' | 'class'>, forwarded to the root element.