Menus and bars¶
A navigation menu offers destinations; a command menu offers actions. Keep those meanings in the underlying anchors and buttons. Start with a short visible list before hiding it behind a trigger.
The examples use the shared theme and setup. Keep the
.fltheme-components wrapper around Basecoat and du- component markup.
Dock · daisyUI¶
A dock holds a few peer destinations for a compact application surface. It is
not a substitute for the documentation site's own navigation. In this specimen
the daisyUI dock is explicitly positioned inside its example instead of fixed
to the viewport; the active item carries aria-current="page" as well as the
visual active state.
<div class="fltheme-components">
<nav aria-label="Bounded example navigation" class="du-dock" style="position:relative;inset:auto"><a aria-current="page" class="du-dock-active" href="../../start/">Start</a><a href="../../text/type/">Text</a><a href="../../images/pictures/">Images</a></nav>
</div>Syntax and variants in daisyUI
Dropdown · daisyUI¶
A dropdown offers a short, contextual list next to its trigger. Native
details and summary supply closed, open, focus, Enter, and Space behaviour
without scripting. The summary names the choice; the links remain ordinary
links in the tab order.
Reading destinations
<div class="fltheme-components">
<details class="du-dropdown"><summary class="du-btn">Reading destinations</summary><ul class="du-dropdown-content du-menu" style="background:var(--color-base-100);width:14rem;z-index:2"><li><a href="../../text/type/">Type and emphasis</a></li><li><a href="../../structure/cards/">Cards and groups</a></li></ul></details>
</div>Syntax and variants in daisyUI
Dropdown menu · Basecoat¶
Expose a short list of commands from one trigger.
Behaviour and access. The runtime manages opening, focus and dismissal. Preserve aria-haspopup, aria-controls and the menu roles. Commands need application handlers; navigation items should be actual links.
Syntax and variants in Basecoat
Megamenu · daisyUI¶
A megamenu is for a broad catalogue whose groups help recognition. If a single short list will do, use a menu or dropdown instead. The native Popover API connects the trigger and panel and supports Escape to dismiss the menu. The panel uses the browser's top layer, so it can extend beyond the specimen.
Syntax and variants in daisyUI
Menu · daisyUI¶
A menu is a compact list of destinations or commands. Use a link for
navigation, a button for an action, and the native disabled attribute for an
unavailable action. A submenu should disclose its nesting instead of depending
on indentation alone.
Syntax and variants in daisyUI
Navbar · daisyUI¶
A navbar arranges a small set of primary controls across one bounded row. Its landmark needs a specific accessible label when another navigation landmark is already present. This specimen is not sticky and does not repeat the real site menu.