spz-menu
When to Use
A navigation menu is the soul of a website, as users rely on navigation to jump between pages. It is generally divided into top navigation and side navigation. Top navigation provides global categories and functions, while side navigation offers a multi-level structure to accommodate and arrange the website's architecture.
This component is commonly used for top navigation, while side navigation typically utilizes the spz-nested-menu component.
Code Demonstration
Basic Usage
The most basic usage, showing a navigation menu without a moreLink.
In the navigation menu, we need to place specific identifiers in certain locations so the component can recognize the current element as a submenu, an inline submenu, or a moreLink. The supported attribute identifiers are as follows:
Using moreLink
A moreLink menu is used only when the first-level menu cannot fit in one line without wrapping, at which point it and its submenus are consolidated inside the moreLink menu for display.
moreLink Template
Within the moreLink menu, you can use a template to customize the display form and style of the menu.
Template Data
AI Summary (LLM Ready)
- Component ID:
spz-menu - One-line purpose: A list menu providing navigation for pages and functions.
- Detected attribute rows: 0
- Detected method subsections: 0
- Detected event subsections: 0
- Top attribute names: none (needs manual completion)
- Top method names: none (needs manual completion)
- Top event names: none (needs manual completion)
- Reading order: start from usage/examples, then verify attributes, methods, and events.
- Related docs: /en/guide/actions-and-events/ , /en/guide/layouts/