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

A dropdown component.

  • On desktop it renders the given content around the given element using Ui.StickyPanel
  • On mobile it renders the given content in a modal

States

width
:
Number
=
0

The width of the panel if matchWidth is true.

Properties

closeOnOutsideClick
:
Bool
=
false

Whether or not to trigger the close event when clicking outside of the panel.

content
:
Html
=
<{ }>

The content to show in the dropdown.

element
:
Html
=
<{ }>

The element which trigger the dropdown.

matchWidth
:
Bool
=
false

Whether or not to make the panel the same width as the element.

offset
:
Number
=
5

The offset from the side of the element.

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

The click event handler.

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

The close event handler.

open
:
Bool
=
false

Whether or not the dropdown is open.

position
:
Ui.Position
=
Ui.Position::BottomLeft

The position of the panel.

zIndex
:
Number
=
1

The zIndex to use for the dropdown.

Functions

render
:
Html

Renders the dropdown.

updateDimensions
(
timestamp
:
Number
)
:
Promise(Void)

Updates the dimensions of the panel if matchWidth is true.