Non-list Menus | menu | Spatie

 SPATIE

  HTML Menu Generator
======================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Menu](https://spatie.be/docs/menu/v2)  Controlling-the-html-output  Non-list Menus

 Version   v3   v2   v1

 Other versions for crawler [v3](https://spatie.be/docs/menu/v3) [v2](https://spatie.be/docs/menu/v2) [v1](https://spatie.be/docs/menu/v1)

  Non-list Menus
- [ Introduction ](https://spatie.be/docs/menu/v2/introduction)
- [ Postcardware ](https://spatie.be/docs/menu/v2/postcardware)
- [ Requirements ](https://spatie.be/docs/menu/v2/requirements)
- [ Installation and Setup ](https://spatie.be/docs/menu/v2/installation-and-setup)
- [ Questions &amp; Issues ](https://spatie.be/docs/menu/v2/questions-and-issues)
- [ Changelog ](https://spatie.be/docs/menu/v2/changelog)
- [ About Us ](https://spatie.be/docs/menu/v2/about-us)

Basic usage
-----------

- [ Your First Menu ](https://spatie.be/docs/menu/v2/basic-usage/your-first-menu)
- [ Adding Items ](https://spatie.be/docs/menu/v2/basic-usage/adding-items)
- [ Building a menu from a data source ](https://spatie.be/docs/menu/v2/basic-usage/building-a-menu-from-a-data-source)

Items in depth
--------------

- [ Active Items ](https://spatie.be/docs/menu/v2/items-in-depth/active-items)
- [ Manipulating Items ](https://spatie.be/docs/menu/v2/items-in-depth/manipulating-items)
- [ Conditionally Adding Items ](https://spatie.be/docs/menu/v2/items-in-depth/conditionally-adding-items)

Controlling the html output
---------------------------

- [ Item Attributes ](https://spatie.be/docs/menu/v2/controlling-the-html-output/item-attributes)
- [ Parent Attributes ](https://spatie.be/docs/menu/v2/controlling-the-html-output/parent-attributes)
- [ Appending and Prepending Html ](https://spatie.be/docs/menu/v2/controlling-the-html-output/appending-and-prepending-html)
- [ Non-list Menus ](https://spatie.be/docs/menu/v2/controlling-the-html-output/non-list-menus)

Menus in your Laravel app
-------------------------

- [ Convenience Methods ](https://spatie.be/docs/menu/v2/menus-in-your-laravel-app/convenience-methods)
- [ Views as Menu Items ](https://spatie.be/docs/menu/v2/menus-in-your-laravel-app/views-as-menu-items)
- [ Conditional Items Based on Permissions ](https://spatie.be/docs/menu/v2/menus-in-your-laravel-app/conditional-items-based-on-permissions)
- [ Using Macros ](https://spatie.be/docs/menu/v2/menus-in-your-laravel-app/using-macros)

Examples
--------

- [ Bootstrap Menu ](https://spatie.be/docs/menu/v2/examples/bootstrap-menu)

      You are viewing the documentation for **an older version** of this package. You can check the version you are using with the following command:

 `                                    composer show spatie/menu                                                                                                                                                                                                                                    `

Non-list Menus
==============

As of v2.5, you can render menus without `ul` and `li` tags. This can be achieved with the `setWrapperTag`, `withoutWrapperTag`, `setParentTag` and `withoutParentTag` methods.

Without wrapper tag &amp; without parent tag:

```
Menu::new()
    ->withoutWrapperTag()
    ->withoutParentTag()
    ->link('/', 'Home')
    ->link('/about', 'About');
```

```
Home
About
```

Without wrapper tag &amp; with custom parent tag:

```
Menu::new()
    ->withoutWrapperTag()
    ->setParentTag('span')
    ->link('/', 'Home')
    ->link('/about', 'About');
```

```
Home
About
```

With custom wrapper tag &amp; without parent tags:

```
Menu::new()
    ->setWrapperTag('nav')
    ->withoutParentTag()
    ->link('/', 'Home')
    ->link('/about', 'About');
```

```

    Home
    About

```

With custom wrapper tag &amp; custom parent tags:

```
Menu::new()
    ->setWrapperTag('nav')
    ->setParentTag('span')
    ->link('/', 'Home')
    ->link('/about', 'About');
```

```

    Home
    About

```

 A good
match?
-------------

### What we do best

- All things Laravel
- Custom frontend components
- Building APIs
- AI-powered features
- Simplifying things
- Clean solutions
- Integrating services

### Not our cup of tea

- WordPress themes
- Cutting corners
- Free mockups to win a job
- "Just execute the briefing"

 In short: we'd like to be a **substantial part** of your project.

 [ Get in touch via email ](mailto:info@spatie.be?subject=A%20good%20match%21&body=Tell%20us%20as%20much%20as%20you%20can%20about%0A-%20your%20online%20project%0A-%20your%20planning%0A-%20your%20budget%0A-%20%E2%80%A6%0A%0AAnything%20that%20helps%20us%20to%20start%20straightforward%21)
