MenuItem
Defined in: components/menu.ts:14
A clickable item in a menu or sidebar nav.
Tip: set href and call Aberdeen’s interceptLinks() once at app
startup for SPA-style navigation. When href is set, the item is
automatically highlighted as active whenever the current URL matches it
(via matchCurrent).
Properties
Section titled “Properties”label:
Slot
Defined in: components/menu.ts:16
Label text or draw function. Strings are rendered as rich text.
optionalicon?:Slot
Defined in: components/menu.ts:18
Leading icon drawn before the label.
click?
Section titled “click?”
optionalclick?: (e) =>void
Defined in: components/menu.ts:20
Click handler.
Parameters
Section titled “Parameters”Event
Returns
Section titled “Returns”void
optionalhref?:string
Defined in: components/menu.ts:26
Render as a link (<a>) pointing here. Pairs naturally with
interceptLinks() — the item is highlighted automatically when the URL
matches.
target?
Section titled “target?”
optionaltarget?:string
Defined in: components/menu.ts:28
target for the link (_blank, etc.). Only meaningful with href.
disabled?
Section titled “disabled?”
optionaldisabled?:boolean
Defined in: components/menu.ts:30
Disables the item.
attrs?
Section titled “attrs?”
optionalattrs?:string
Defined in: components/menu.ts:32
Aberdeen attr/style string on the item element.