Skip to component content

A bordered toolbar row that groups several documented Bootstrap Dropdown Menu contracts.

Usage

Use .menubar as a compact row of related Bootstrap dropdown triggers, such as document, editor, or workspace command groups. Keep top-level labels short, group related commands under each trigger, and keep each popup menu built from the same Dropdown Menu item, header, and divider structure used elsewhere.

Label the row as one toolbar-like surface, but do not claim desktop application menubar behavior unless the full keyboard model is implemented. Bootstrap dropdowns already support click opening, item movement, and Escape dismissal; Moo UI should add only the composition and visual frame around those dropdowns.

Use .menubar when the commands are siblings at the same level. If one trigger contains the main action and another only contains overflow, use Button Group or Dropdown Menu instead; if the items are route links, use Navigation so current-page state and link semantics stay clear.

Basic

Each menu keeps documented Bootstrap dropdown trigger and menu markup; the bordered toolbar row is the only additional composition.

Menubar
<div class="menubar d-inline-flex align-items-center border rounded-3" role="group" aria-label="Document actions">
  <div class="dropdown">
    <button class="btn btn-ghost" type="button" data-bs-toggle="dropdown" aria-expanded="false" data-bs-offset="0,8">File</button>
    <ul class="dropdown-menu">
      <li>
        <button class="dropdown-item" type="button">
          <span>New document</span>
          <span class="ms-auto small text-body-secondary">⌘N</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <span>Open workspace</span>
          <span class="ms-auto small text-body-secondary">⌘O</span>
        </button>
      </li>
      <li>
        <hr class="dropdown-divider">
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <span>Export</span>
          <span class="ms-auto small text-body-secondary">⌘E</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <span>Print</span>
          <span class="ms-auto small text-body-secondary">⌘P</span>
        </button>
      </li>
    </ul>
  </div>
  <div class="dropdown">
    <button class="btn btn-ghost" type="button" data-bs-toggle="dropdown" aria-expanded="false" data-bs-offset="0,8">Edit</button>
    <ul class="dropdown-menu">
      <li>
        <button class="dropdown-item" type="button">
          <span>Undo</span>
          <span class="ms-auto small text-body-secondary">⌘Z</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <span>Redo</span>
          <span class="ms-auto small text-body-secondary">⇧⌘Z</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <span>Find</span>
        </button>
      </li>
      <li>
        <hr class="dropdown-divider">
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <span>Cut</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <span>Copy</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <span>Paste</span>
        </button>
      </li>
    </ul>
  </div>
  <div class="dropdown">
    <button class="btn btn-ghost" type="button" data-bs-toggle="dropdown" aria-expanded="false" data-bs-offset="0,8">View</button>
    <ul class="dropdown-menu">
      <li>
        <button class="dropdown-item" type="button">
          <span>Zoom in</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <span>Zoom out</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <span>Reset zoom</span>
        </button>
      </li>
    </ul>
  </div>
</div>

With a header and destructive item

dropdown_header() and dropdown_item(destructive=true) compose the same way they do in a standalone Dropdown Menu.

Menubar
<div class="menubar d-inline-flex align-items-center border rounded-3" role="group" aria-label="Workspace actions">
  <div class="dropdown">
    <button class="btn btn-ghost" type="button" data-bs-toggle="dropdown" aria-expanded="false" data-bs-offset="0,8">File</button>
    <ul class="dropdown-menu">
      <li>
        <button class="dropdown-item" type="button">
          <span>New document</span>
          <span class="ms-auto small text-body-secondary">⌘N</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <span>Export as PDF</span>
        </button>
      </li>
    </ul>
  </div>
  <div class="dropdown">
    <button class="btn btn-ghost" type="button" data-bs-toggle="dropdown" aria-expanded="false" data-bs-offset="0,8">Team</button>
    <ul class="dropdown-menu">
      <li>
        <h6 class="dropdown-header">Members</h6>
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <span>Invite teammate</span>
          <span class="ms-auto small text-body-secondary">⇧⌘I</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <span>Manage roles</span>
        </button>
      </li>
      <li>
        <hr class="dropdown-divider">
      </li>
      <li>
        <button class="dropdown-item" type="button" data-variant="destructive">
          <span>Leave workspace</span>
        </button>
      </li>
    </ul>
  </div>
</div>

With icons

dropdown_item() already renders a leading icon; the menubar composes it the same way a standalone Dropdown Menu does.

Menubar
<div class="menubar d-inline-flex align-items-center border rounded-3" role="group" aria-label="Document actions with icons">
  <div class="dropdown">
    <button class="btn btn-ghost" type="button" data-bs-toggle="dropdown" aria-expanded="false" data-bs-offset="0,8">File</button>
    <ul class="dropdown-menu">
      <li>
        <button class="dropdown-item" type="button">
          <i class="lucide lucide-file-text" data-icon="inline-start" aria-hidden="true"></i>
          <span>New document</span>
          <span class="ms-auto small text-body-secondary">⌘N</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <i class="lucide lucide-upload" data-icon="inline-start" aria-hidden="true"></i>
          <span>Import file</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <i class="lucide lucide-download" data-icon="inline-start" aria-hidden="true"></i>
          <span>Export as PDF</span>
        </button>
      </li>
      <li>
        <hr class="dropdown-divider">
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <i class="lucide lucide-printer" data-icon="inline-start" aria-hidden="true"></i>
          <span>Print</span>
          <span class="ms-auto small text-body-secondary">⌘P</span>
        </button>
      </li>
    </ul>
  </div>
  <div class="dropdown">
    <button class="btn btn-ghost" type="button" data-bs-toggle="dropdown" aria-expanded="false" data-bs-offset="0,8">Edit</button>
    <ul class="dropdown-menu">
      <li>
        <button class="dropdown-item" type="button">
          <i class="lucide lucide-undo" data-icon="inline-start" aria-hidden="true"></i>
          <span>Undo</span>
          <span class="ms-auto small text-body-secondary">⌘Z</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <i class="lucide lucide-redo" data-icon="inline-start" aria-hidden="true"></i>
          <span>Redo</span>
          <span class="ms-auto small text-body-secondary">⇧⌘Z</span>
        </button>
      </li>
      <li>
        <hr class="dropdown-divider">
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <i class="lucide lucide-copy" data-icon="inline-start" aria-hidden="true"></i>
          <span>Duplicate page</span>
        </button>
      </li>
    </ul>
  </div>
</div>

Checkbox

Toggleable menu options use Bootstrap's button toggle data-api inside dropdown_item-compatible rows, so Arrow keys, Space, Enter, and auto_close="outside" keep the same Bootstrap contract.

Menubar
<div class="menubar d-inline-flex align-items-center border rounded-3" role="group" aria-label="View options">
  <div class="dropdown">
    <button class="btn btn-ghost" type="button" data-bs-toggle="dropdown" aria-expanded="false" data-bs-offset="0,8" data-bs-auto-close="outside">View</button>
    <ul class="dropdown-menu">
      <li>
        <button class="dropdown-item dropdown-item-check active" type="button" data-bs-toggle="button" aria-pressed="true">
          <span class="dropdown-item-check__indicator" aria-hidden="true">
            <i class="lucide lucide-check" data-icon="inline-start" aria-hidden="true"></i>
          </span>
          <span>Sidebar</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item dropdown-item-check" type="button" data-bs-toggle="button" aria-pressed="false">
          <span class="dropdown-item-check__indicator" aria-hidden="true">
            <i class="lucide lucide-check" data-icon="inline-start" aria-hidden="true"></i>
          </span>
          <span>Compact mode</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item dropdown-item-check" type="button" data-bs-toggle="button" aria-pressed="false">
          <span class="dropdown-item-check__indicator" aria-hidden="true">
            <i class="lucide lucide-check" data-icon="inline-start" aria-hidden="true"></i>
          </span>
          <span>Focus mode</span>
        </button>
      </li>
      <li>
        <hr class="dropdown-divider">
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <span>Refresh</span>
          <span class="ms-auto small text-body-secondary">⌘R</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item" type="button" disabled>
          <span>Force refresh</span>
          <span class="ms-auto small text-body-secondary">⇧⌘R</span>
        </button>
      </li>
    </ul>
  </div>
</div>

Radio

Single-select menu options use a real fieldset and radio inputs. data-bs-auto-close="outside" keeps the menu open while a profile is picked.

Menubar
<div class="menubar d-inline-flex align-items-center border rounded-3" role="group" aria-label="Profile options">
  <div class="dropdown">
    <button class="btn btn-ghost" type="button" data-bs-toggle="dropdown" aria-expanded="false" data-bs-offset="0,8" data-bs-auto-close="outside">Profile</button>
    <ul class="dropdown-menu">
      <li class="px-3 py-2">
        <fieldset class="radio-group">
          <legend class="form-label">Profile</legend>
          <div class="form-check">
            <input class="form-check-input" type="radio" name="menubar-profile" id="menubar-profile-priya">
            <label class="form-check-label" for="menubar-profile-priya">Priya</label>
          </div>
          <div class="form-check">
            <input class="form-check-input" type="radio" name="menubar-profile" id="menubar-profile-noah" checked>
            <label class="form-check-label" for="menubar-profile-noah">Noah</label>
          </div>
          <div class="form-check">
            <input class="form-check-input" type="radio" name="menubar-profile" id="menubar-profile-sana">
            <label class="form-check-label" for="menubar-profile-sana">Sana</label>
          </div>
        </fieldset>
      </li>
      <li>
        <hr class="dropdown-divider">
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <span>Edit profile…</span>
        </button>
      </li>
      <li>
        <button class="dropdown-item" type="button">
          <span>Add profile…</span>
        </button>
      </li>
    </ul>
  </div>
</div>

RTL

Switch between Arabic and Hebrew RTL labels, with English as the LTR comparison for spacing and trigger alignment.

Status
Accepted
Runtime
Bootstrap plugin
Markup
Moo UI documented extension
Reference

For Bootstrap's Dropdown plugin options, positioning, and keyboard behavior, see the Bootstrap Dropdowns documentation.

Known limitation
Submenu is not yet supported: the reference nests a hover-opened flyout menu inside a menu item (for example Edit > Find, or File > Share). Bootstrap's dropdown plugin has no native nested-menu behavior, and faking one with plain markup would claim a keyboard/hover model this catalog cannot back yet. Items like Find above render as plain commands instead of a submenu trigger. Tracked as a gap rather than approximated with misleading markup.

Settings

Theme
Choose how Moo UI looks on this device.
Sidebar
Choose how the sidebar sits on the page.
Theme Builder
Tune catalog tokens and chart colors for this browser.
Base color
Theme color
Chart color
Heading font
Body font
Radius
Direction
Choose the reading direction. RTL flips the layout live.
Reset

Restore the default appearance.