Skip to content
LoidoltTheme 0.11.1
Svelte 5

Component

NavMenu

A topbar section that opens a menu of destinations.

import { NavMenu } from '@loidolt/theme-svelte';

Example

Selected: templates

Notes

  • active marks the trigger with aria-current="page", not just a class.

Props

Generated from the component source, so it cannot drift from the implementation.

NavMenu props
PropTypeDefaultNotes
label required string—Trigger text.
active booleanfalseMarks this entry as the current section: styles the trigger and sets aria-current.
align Alignment—
children Snippet—
class string—class lands on the trigger; use menuClass for the popup.
groupLabel string—Heading above the items inside the popup.
items MenuItem<T>[]—
menuClass string—
onOpenChange (open: boolean) => void—
onSelect (value: T) => void—
open bindablebooleanfalse
side Placement—

Plus the attributes of Omit<HTMLButtonAttributes, 'children' | 'class' | 'type'>, forwarded to the root element.