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

An action sheet comes up from the bottom of the screen and displays actions a user can take.

Some of its features:

  • Showing the component returns a promise which is resolved when its closed.

  • When open pressing Esc closes it.

  • After opened it will focus the first focusable item.

  • On navigation it closes.

  • The keyboard focus is trapped in the list: Tab and Shift-Tab cycles focusable elements.

  • When closed the focus is returned to the last focused element before opening (which is usually the one that opened the action-sheet).

States

focusedElement
:
Maybe(Dom.Element)
=
Maybe::Nothing

The previously focused element.

items
:
Array(Ui.NavItem)
=
[]

The displayed items.

open
:
Bool
=
false

The state of the component (open / closed).

resolve
:
Function(Void, Void)
=
(value : Void) { void }

The resolve function.

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

The base size of the component.

Functions

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

The close event handler.

handleItemClick
(
onClick
:
Function(Html.Event, Promise(Void))
event
:
Html.Event
)

The item click event handler.

handleLinkClick
(
href
:
String
event
:
Html.Event
)

The link click event handler.

handleUrlChange
(
url
:
Url
)
:
Promise(Void)

The url change event handler.

hide
:
Promise(Void)

Hides the component.

render
:
Html

Renders the component.

renderContents
(
iconAfter
:
Html
iconBefore
:
Html
label
:
String
group
:
Bool
href
:
String
target
:
String
onClick
:
Function(Html.Event, Promise(Void))
)

Renders the contents of the item.

renderItem
(
item
:
Ui.NavItem
)
:
Html

Renders the given navigation item.

show
(
items
:
Array(Ui.NavItem)
)
:
Promise(Void)

Shows the component with the given items.

showWithOptions
(
size
:
Ui.Size
items
:
Array(Ui.NavItem)
)
:
Promise(Void)

Shows the component with the given items and options.