BetaPublic beta — Read the release notes
Documentation

File Input

File upload trigger with dropzone support and validation.

Package
@solidiom/file-input
Version
0.6.0
Status
experimental

Generated from the package's public source.

API

FileInputFileItemPropsinterface

Props

class?
string
index
number — Index of the file in the list.
style?
string | CSSProperties

children: Element

View source

FileInputFileListPropsinterface

Props

class?
string
style?
string | CSSProperties

children: Element | (file: File, index: () => number) => Element

View source

FileInputFileRemovePropsinterface

Props

class?
string
index?
number — Index of the file to remove. If omitted, uses FileItem context.
style?
string | CSSProperties

children: Element

View source

FileInputHiddenInputPropsinterface

Props

class?
string

View source

FileInputRootPropsinterface

Props

accept?
string[] — Accepted MIME types (e.g. 'image/*', 'application/pdf').
class?
string
disabled?
boolean — Whether the file input is disabled.
files?
File[] — Controlled file list.
id?
string — Element id.
invalid?
boolean — Whether the field is invalid.
maxFiles?
number — Maximum number of files.
maxFileSize?
number — Maximum file size in bytes.
multiple?
boolean — Whether multiple files can be selected.
name?
string — Form field name.
onFilesChange?
(files: File[]) => void — Called when the file list changes.
onReject?
(files: File[], reasons: string[]) => void — Called when files are rejected during validation.
required?
boolean — Whether the field is required.
style?
string | CSSProperties

children: Element

View source

FileInputTriggerPropsinterface

Props

class?
string
style?
string | CSSProperties

children: Element

View source

FileItemcomponent

                        FileItem(props: FileInputFileItemProps): Element
                      

Props

class?
string
index
number — Index of the file in the list.
style?
string | CSSProperties

children: Element

View source

FileListcomponent

                        FileList(props: FileInputFileListProps): Element
                      

Props

class?
string
style?
string | CSSProperties

children: Element | (file: File, index: () => number) => Element

View source

FileRemovecomponent

                        FileRemove(props: FileInputFileRemoveProps): Element
                      

Props

class?
string
index?
number — Index of the file to remove. If omitted, uses FileItem context.
style?
string | CSSProperties

children: Element

View source

HiddenInputcomponent

                        HiddenInput(props: FileInputHiddenInputProps): Element
                      

Props

class?
string

View source

Rootcomponent

                        Root(props: FileInputRootProps): Element
                      

Props

accept?
string[] — Accepted MIME types (e.g. 'image/*', 'application/pdf').
class?
string
disabled?
boolean — Whether the file input is disabled.
files?
File[] — Controlled file list.
id?
string — Element id.
invalid?
boolean — Whether the field is invalid.
maxFiles?
number — Maximum number of files.
maxFileSize?
number — Maximum file size in bytes.
multiple?
boolean — Whether multiple files can be selected.
name?
string — Form field name.
onFilesChange?
(files: File[]) => void — Called when the file list changes.
onReject?
(files: File[], reasons: string[]) => void — Called when files are rejected during validation.
required?
boolean — Whether the field is required.
style?
string | CSSProperties

children: Element

View source

Triggercomponent

                        Trigger(props: FileInputTriggerProps): Element
                      

Props

class?
string
style?
string | CSSProperties

children: Element

View source