Skip to content

Set Up a Navigation Menu

Build a navigation menu with the Kompass Menu Builder and render it in your Blade templates via a Livewire component.

Step 1: Create a New Menu

  1. Log in to the Admin Dashboard.
  2. Navigate to Tools > Menu Builder.
  3. Click "New Menu".
  4. Enter a Name (e.g., Header Menu). The Slug (e.g., header-menu) is what you'll reference in your code.
  5. Click Save.

Step 2: Build the Menu Structure

  1. Click the "Builder" button next to your menu.
  2. Add items by providing a Name and a URL (or internal route).
  3. Organize by Drag & Drop:
    • Move items up or down to change their order.
    • Indent items to the right to create sub-menus (dropdowns).
  4. Click Save Changes.

Step 3: Render the Menu in Blade

Use the Kompass Livewire component in your layout file to output the menu.

blade
{{-- In your resources/views/layouts/app.blade.php --}}

<nav>
    <livewire:menus name="header-menu" />
</nav>

Customizing the Menu Output

The default component renders a clean list using the <x-kompass::menus> Blade component, which handles both simple and nested items with dropdown support automatically.

Released under the MIT License.