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.Input

A component for getting user input.

States

currentValue
:
Maybe(String)
=
Maybe::Nothing

The current value of the input.

timeoutId
:
Number
=
0

The ID of the last timeout.

Properties

disabled
:
Bool
=
false

Whether or not the input is disabled.

icon
:
Html
=
<></>

The content for the icon.

iconInteractive
:
Bool
=
false

Whether or not the icon is interactive.

inputDelay
:
Number
=
0

The number of milliseconds to delay the onChange event.

invalid
:
Bool
=
false

Whether or not the input is invalid.

list
:
String
=
""

The ID of the datalist element to connect to this input.

onBlur
:
Function(Promise(Void))
=
Promise.never

The blur event handler.

onChange
:
Function(String, Promise(Void))
=
Promise.never1

The change event handler.

onFocus
:
Function(Promise(Void))
=
Promise.never

The focus event handler.

onIconClick
:
Function(Html.Event, Promise(Void))
=
Promise.never1

The event handler for the icons click event.

onKeyDown
:
Function(Html.Event, Promise(Void))
=
Promise.never1

The keydown event handler.

onKeyUp
:
Function(Html.Event, Promise(Void))
=
Promise.never1

The keyup event handler.

onMouseDown
:
Function(Html.Event, Promise(Void))
=
Promise.never1

The mousedown event handler.

onMouseUp
:
Function(Html.Event, Promise(Void))
=
Promise.never1

The mouseup event handler.

onTabIn
:
Function(Promise(Void))
=
Promise.never

The event handler when the user tabs into the input.

onTabOut
:
Function(Promise(Void))
=
Promise.never

The event handler when the user tabs out of the input.

placeholder
:
String
=
""

The placeholder to show.

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

The size of the input.

type
:
String
=
"text"

The type of the input, should be either text or email.

value
:
String
=
""

The value of the input.

Functions

focus
:
Promise(Void)

Focuses the input.

handleChange
(
event
:
Html.Event
)

Handles the input and change events.

render
:
Html

Renders the input.