Try Install Learn Blog API Packages GitHub
Pages
mint-ui

Search
Basic information
Entities
Versions
Dependencies
mint-color 0.9.0 <= v < 1.0.0

Ui.FileInput

An input for selecting a file.

Properties

accept
:
String
=
"*"

The content-type of the files the user can select.

clearLabel
:
String
=
"Clear"

The label for the clear action.

onChange
:
Function(Maybe(File), Promise(Void))
=
Promise.never1

The change event handler.

selectAnotherLabel
:
String
=
"Click to select a different file."

The label for selecting a different file.

selectLabel
:
String
=
"Select a file"

The initial label for selecting a file.

size
:
Ui.Size
=
Ui.Size::Inherit

The size of the input.

value
:
Maybe(File)
=
Maybe::Nothing

The selected file.

Functions

focus
:
Promise(Void)

Focuses the element.

handleClear
(
event
:
Html.Event
)
:
Promise(Void)

Handles the clear event.

handleSelect
(
event
:
Html.Event
)
:
Promise(Void)

Handles the select event.

render
:
Html

Renders the component.