App launcher

Material Design 3 menu web component, built on the native Popover API.

  • 3.1 KB gzipped
  • @lit-material/menu 0.2.0
  • Renders on the server

Example

Install

npm install @lit-material/menu @lit-material/tokens
import "@lit-material/menu";

Link @lit-material/tokens/css/index.css once per page for the colour, type and shape tokens. Install guide

API

<lit-material-app-launcher>

An app launcher: a grid button in a top bar that opens a menu of the other apps and consoles a person can go to — Grafana, the billing portal, the docs.

Properties

PropertyAttributeTypeDefaultDescription
labellabelstring"Applications"Names the button and the menu.
searchablesearchablebooleanfalseAdds a field that filters the apps by their text.
searchLabelsearch-labelstring"Search applications"The search field's accessible name.
emptyTextempty-textstring"No applications match"Shown when the search matches nothing.
openopenbooleanfalse

Events

EventDescription
closeAfter the menu closes.

Slots

SlotDescription
defaultThe apps: lit-material-list-item elements with href.
iconReplaces the grid icon on the button.

CSS parts

PartDescription
buttonThe button that opens the menu.
menuThe menu.
searchThe search field.

Source on GitHub npm