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

Simple button component with a label and icons before or after the label.

It works in two modes:

  • as a button, the onClick event needs to be handled
  • as a link if the href property is not empty

Properties

align
:
String
=
"center"

Where to align the text in case the button is wide.

breakWords
:
Bool
=
false

Whether or not to break the words.

disabled
:
Bool
=
false

Whether or not the button is disabled.

ellipsis
:
Bool
=
true

Whether or not make the text use ellipsis in case it overflows.

href
:
String
=
""

The href of the button.

iconAfter
:
Html
=
<></>

The icon after the label.

iconBefore
:
Html
=
<></>

The icon before the label.

label
:
String
=
""

The label of the button.

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

The click event handler.

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

The mouse down event handler.

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

The mouse up event handler.

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

The size of the button.

target
:
String
=
""

The target window of the URL.

type
:
String
=
"primary"

The type of the button.

Functions

focus
:
Promise(Void)

Focuses the button.

render
:
Html

Renders the button.