Menu

com.alecdorrington.laminarcomponents.Menu
object Menu

A drop-down menu, closed by a choice, a click elsewhere, or Escape. Its own clicks never reach the document, so opening one never closes it.

Drawn as .lc-menu, its button .lc-menu-toggle, the list .lc-menu-list and its choices .lc-menu-item.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Menu.type

Members list

Value members

Concrete methods

def apply(toggle: Modifier[L.HtmlElement]*)(items: (() => Unit) => List[L.HtmlElement]): L.HtmlElement

Renders a button opening a menu beneath it.

Renders a button opening a menu beneath it.

Value parameters

items

The choices, built when the menu opens, given a function closing it.

toggle

The button's content and modifiers.

Attributes

Returns

The button and its menu.

def item(close: () => Unit, act: () => Unit)(contents: Modifier[L.HtmlElement]*): L.HtmlElement

Renders a choice of a menu.

Renders a choice of a menu.

Value parameters

act

What choosing it does, after the menu closes.

close

The function closing the menu, as apply gives it.

contents

The choice's content and modifiers.

Attributes

Returns

The choice.