Skip to content

menu

menu(opts): void

Defined in: components/menu.ts:754

A menu drawn in place: the same list of rows the floating dropdown and S.main()’s sidebar are made of, as a plain component — for a nav of your own, a settings column, a sidebar the shell doesn’t draw for you. Items are real links/buttons with arrow-key navigation, href items highlight themselves on the current page, and an item with items of its own becomes a collapsible branch (see MenuItem.items): only the branch holding the current page stays unfolded.

MenuListOptions

void

S.menu({
items: [
{ label: "Overview", href: "/docs" },
{ label: "Guides", items: [
{ label: "Install", href: "/docs/install" },
{ label: "Theming", href: "/docs/theming" },
]},
],
});