Try Install Learn Blog API Packages GitHub
Pages

Ui.Header

The header component with a brand and navigation items which on mobile collapses into a icon which when interacted with opens up an action sheet with the navigation items.

TODO: Dropdown items and nested groups.

States

openDropdowns
:
Map(String, Bool)
=
Map.empty()
url
:
Url
=
Window.url()

A state to store the current url.

Properties

brand
:
Html
=
<></>

Content for the brand.

icon
:
Html
=
Ui.Icons:THREE_BARS

The menu icon.

items
:
Array(Ui.NavItem)
=
[]

The navigation items.

size
:
Number
=
16

The size of the component.

Functions

handleClick
:
Promise(Never, Void)

The menu icon click handler.

render
:
Html

Renders the component.

renderItem
(
iconBefore
:
Html
iconAfter
:
Html
label
:
String
)

Renders the contents of an item.