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

Represents the store which all components connect to.

States

darkMode
:
Bool
=
case Storage.Local.get("ui.dark-mode") { Result::Err => Window.matchesMediaQuery("(prefers-color-scheme: dark)") Result::Ok(value) => value == "true" }

Whether or not to show dark mode.

images
:
Set(String)
=
Set.empty()
Window.addMediaQueryListener( "(max-width: 1000px)", (active : Bool) { next { mobile: active } })

A media query listener for to set mobile property.

mobile
:
Bool
=
Window.matchesMediaQuery("(max-width: 1000px)")

Whether or not we are in a mobile view.

Functions

disabledHandler
(
disabled
:
Bool
handler
:
Function(a, Promise(Void))
)
:
Function(a, Promise(Void))

A function to not do anything based on a disabled argument.

inputDelayHandler
(
timeoutId
:
Number
delay
:
Number
event
:
Html.Event
)
:
Tuple(Number, String, Promise(Void))

A function to handle changes from input delay.

isFullyVisible
(
dimensions
:
Dom.Dimensions
)
:
Bool

Returns if the given element is fully visible on the screen.

TODO: Move to core library.

isVisible
(
element
:
Dom.Element
)
:
Bool

Returns if the given element is visible on the screen.

TODO: Move to core library.

scrollIntoViewIfNeeded
(
element
:
Dom.Element
)
:
Promise(Void)

Scrolls the given element into view if it's not visible.

TODO: Move to core library.

setDarkMode
(
value
:
Bool
)
:
Promise(Void)

Sets the dark mode state.

setImageLoaded
(
src
:
String
)
toggleDarkMode
:
Promise(Void)