File Input Node

File Inputs are common form controls that allows the user to select files from their local file system. This node roughly corresponds to the HTML input element that has a file type.

Properties

Visible

PropfileInputNode.isVisible
Typeboolean
Default{{true}}

Whether or not this node is visible.

Enabled

PropfileInputNode.isEnabled
Typeboolean
Default{{true}}

Whether or not this node is enabled.

Tooltip

PropfileInputNode.tooltip
Typestring
Defaultundefined

The tooltip text to display when hovered or focused over this node.

Top

PropfileInputNode.top
Typestring
Default1

The position of the node from the top side of the grid (grid-row-start).

Left

PropfileInputNode.left
Typestring
Default1

The position of the node from the left side of the grid (grid-column-start).

Width

PropfileInputNode.width
Typestring
Default384px

The width of the node. When this node is in a grid layout, this should be done using unitless grid column units (specifying 4 will become grid-column-end: span 4). When this node is in a stack layout, the width must be specified using CSS units (e.g. 100px or 100%).

Min Width

PropfileInputNode.minWidth
Typestring
Defaultnone

The minimum width of the node. When this node is in a grid layout, this property is ignored.

Max Width

PropfileInputNode.maxWidth
Typestring
Defaultnone

The maximum width of the node. When this node is in a grid layout, this property is ignored.

Height

PropfileInputNode.height
Typestring
Default160px

The height of the node. When this node is in a grid layout, this should be done using unitless grid row units (specifying 4 will become grid-row-end: span 4). When this node is in a stack layout, the height must be specified using CSS units (e.g. 100px or 100%).

Min Height

PropfileInputNode.minHeight
Typestring
Defaultnone

The minimum height of the node. When this node is in a grid layout, this property is ignored.

Max Height

PropfileInputNode.maxHeight
Typestring
Defaultnone

The minimum height of the node. When this node is in a grid layout, this property is ignored.

Overflow

PropfileInputNode.overflow
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the horizontal and vertical axes for content that is larger than its container.

Overflow X

PropfileInputNode.overflowX
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the horizontal axis for content that is larger than its container.

Overflow Y

PropfileInputNode.overflowY
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the vertical axis for content that is larger than its container.

Custom Styles

PropfileInputNode.styles
Typestring
Defaultelement.styles { }

Custom CSS styles to be applied to the node. Use element.styles to refer to the current node.

Files

PropfileInputNode.files
TypeArray<{ name: string, type: string, parsedFile: string, size: number }>
Defaultundefined

The upload expression to display.

Field Name

PropfileInputNode.formFieldName
Typestring
Defaultundefined

Defines the key for this input in the body of the submitted form.

Selection Label

PropfileInputNode.selectLabel
Typestring
DefaultSelect

The text to display over file selector.

Upload Icon

PropfileInputNode.selectIcon
Typestring
DefaultFaUpload

The icon to display on the left side of the file selector.

File Type

PropfileInputNode.fileTypeFilter
TypeFileType ('image/*' | 'audio/*' | 'video/*' | '')
Defaultundefined

The type of file to allow the user to select.

Previews

PropfileInputNode.enablePreview
Typeboolean
Default{{false}}

Toggle to display the preview images

Multiple Files

PropfileInputNode.multiSelect
Typeboolean
Default{{true}}

Allow users to select multiple files from directory

Drag & Drop

PropfileInputNode.draggable
Typeboolean
Default{{false}}

Allow users to drag files from directory

Limit Amount

PropfileInputNode.fileCountLimit
Typestring
Defaultunlimited

Restrict number of files user can upload

Max File Size

PropfileInputNode.maxFileSize
Typenumber
Default5

Restrict total size of files user can upload

Event Handlers

On Change

HandlerfileInputNode.onChange

Called after the user selects their files. Use this event to trigger downstream actions when user makes a file selection.