spatie/menu
Html menu generator
3.2.1
3.1M downloads/mo
#4087 most downloaded on Packagist
spatie/menu
What this package is like to depend on
Last release 1 years ago
13 Jun 2025
Release timing varies
gaps range from 8 days to 2.2 years
Most releases are documented
notes for 34 of 51 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
55 releases · first in 2016
0 releases in the last 12 months
see the full history below
Release timeline
55 releases · Feb 2016 to Jun 2025Releases
latest 55-
3.2.113 Jun 2025Release notes
Open source →What's Changed
- Fix wrapping in Bootstrap menu code example by @buddhaCode in #148
- Add hint to the spiritual successor by @buddhaCode in #149
- ci: fix deprecations in the ci and improve it by @Chris53897 in #152
- refactor(check): simplified final comparison to directly return boolean result by @Ayoub-Mabrouk in #155
- refactor: simplify isActive() by combining prepend check into return by @Ayoub-Mabrouk in #154
New Contributors
- @buddhaCode made their first contribution in #148
- @Chris53897 made their first contribution in #152
- @Ayoub-Mabrouk made their first contribution in #155
Full Changelog: 3.2.0...3.2.1
Release notes
Open source →What's Changed
- Fix wrapping in Bootstrap menu code example by @buddhaCode in https://github.com/spatie/menu/pull/148
- Add hint to the spiritual successor by @buddhaCode in https://github.com/spatie/menu/pull/149
- ci: fix deprecations in the ci and improve it by @Chris53897 in https://github.com/spatie/menu/pull/152
- refactor(check): simplified final comparison to directly return boolean result by @Ayoub-Mabrouk in https://github.com/spatie/menu/pull/155
- refactor: simplify isActive() by combining prepend check into return by @Ayoub-Mabrouk in https://github.com/spatie/menu/pull/154
New Contributors
- @buddhaCode made their first contribution in https://github.com/spatie/menu/pull/148
- @Chris53897 made their first contribution in https://github.com/spatie/menu/pull/152
- @Ayoub-Mabrouk made their first contribution in https://github.com/spatie/menu/pull/155
Full Changelog: https://github.com/spatie/menu/compare/3.2.0...3.2.1
-
3.2.012 Apr 2023Release notes
Open source →What's Changed
- Make
->setExactActive()accept a callable as well by @ralphjsmit in #146
New Contributors
- @ralphjsmit made their first contribution in #146
Full Changelog: 3.1.1...3.2.0
Release notes
Open source →What's Changed
- Make
->setExactActive()accept a callable as well by @ralphjsmit in https://github.com/spatie/menu/pull/146
New Contributors
- @ralphjsmit made their first contribution in https://github.com/spatie/menu/pull/146
Full Changelog: https://github.com/spatie/menu/compare/3.1.1...3.2.0
- Make
-
3.1.113 Mar 2023Release notes
Open source →- fix active classes
What's Changed
- Add
idto docs by @milwad-dev in #144
Full Changelog: 3.1.0...3.1.1
Release notes
Open source →- fix active classes
What's Changed
- Add
idto docs by @milwad-dev in https://github.com/spatie/menu/pull/144
Full Changelog: https://github.com/spatie/menu/compare/3.1.0...3.1.1
-
3.1.010 Mar 2023Release notes
Open source →What's Changed
- typofix in item-attributes.md by @davidjr82 in #138
- Add PHP 8.2 Support by @patinthehat in #141
- Refactor tests to pest by @AyoobMH in #142
- Add
idattribute for menu by @milwad-dev in #143
New Contributors
- @davidjr82 made their first contribution in #138
- @AyoobMH made their first contribution in #142
- @milwad-dev made their first contribution in #143
Full Changelog: 3.0.1...3.1.0
Release notes
Open source →What's Changed
- typofix in item-attributes.md by @davidjr82 in https://github.com/spatie/menu/pull/138
- Add PHP 8.2 Support by @patinthehat in https://github.com/spatie/menu/pull/141
- Refactor tests to pest by @AyoobMH in https://github.com/spatie/menu/pull/142
- Add
idattribute for menu by @milwad-dev in https://github.com/spatie/menu/pull/143
New Contributors
- @davidjr82 made their first contribution in https://github.com/spatie/menu/pull/138
- @AyoobMH made their first contribution in https://github.com/spatie/menu/pull/142
- @milwad-dev made their first contribution in https://github.com/spatie/menu/pull/143
Full Changelog: https://github.com/spatie/menu/compare/3.0.1...3.1.0
-
3.0.111 Nov 2021 -
3.0.024 Mar 2021 -
2.10.316 Mar 2021 -
2.10.202 Dec 2020 -
2.10.102 Dec 2020 -
2.10.002 Dec 2020 -
2.9.006 Nov 2020 -
2.8.005 Nov 2018Release notes
Open source →- Add
exact-activeclass to links that exactly match the current URL. This is accompanied by asetExactActiveClass(string $class)method to set the class name
- Add
-
2.7.023 Oct 2018 -
2.6.010 Sep 2018Release notes
Open source →- Add
beforeRenderandwillRenderhooks that are called when an item is rendered
- Add
-
2.5.002 Mar 2018Release notes
Open source →- This release adds a few methods to create non-
ulmenus, which allows for Bootstrap 4 compatibility - Added
Menu::setWrapperTagandMenu::withoutWrapperTagto set a custom wrapper tag name for the menu list. Default:ul - Added
Menu::setParentTag&Menu::withoutParentTagto determine which tag should be used for the item's parent element. Default:li - Added
Menu::setActiveClassOnLinkandMenu::setActiveClassOnParentto determine where the active class should be applied
- This release adds a few methods to create non-
-
2.4.113 Nov 2017 -
2.4.017 Oct 2017 -
2.3.129 Aug 2017 -
2.3.028 Aug 2017 -
2.2.211 Jul 2017 -
2.2.107 Mar 2017 -
2.2.009 Feb 2017 -
2.1.302 Feb 2017 -
2.1.202 Feb 2017Nothing published for this version
-
2.1.125 Jan 2017 -
2.1.024 Nov 2016 -
2.0.111 Oct 2016 -
2.0.027 Sep 2016Release notes
Open source →- Added added the static
Menu::buildand non-staticMenu::fillmethods to create menu's from arrays. - Added the
setActivemethod onActivatablenow also accepts a non-strict boolean or callable parameter to set$activeto true or false. - Added
Menu::htmlandMenu::htmlIfnow accept a$parentAttributesarray as their second arguments. - Changed the
HtmlAttributesandParentAttributestraits have been renamed toHasHtmlAttributesandHasParentAttributes. - Changed the
HasUrlinterface and trait has been removed. Url-related methods now also are part of theActivatableinterface and trait. - Removed the
voidandvoidIfhave been removed. These can be replaced byhtmlandhtmlIf, with empty strings as their first arguments - Removed the
prefixLinksandprefixUrlsmethods have been removed because they were too unpredictable in some case. There currently isn't an alternative for these, besides writing your own logic and applying it withapplyToAll.
- Added added the static
-
2.0.0-beta.427 Sep 2016 pre-releaseNothing published for this version
-
2.0.0-beta.326 Sep 2016 pre-releaseNothing published for this version
-
2.0.0-beta.226 Sep 2016 pre-releaseNothing published for this version
-
2.0.0-beta.121 Sep 2016 pre-releaseNothing published for this version
-
1.4.002 Sep 2016 -
1.3.029 Aug 2016 -
1.2.101 Aug 2016 -
1.2.025 Jun 2016Release notes
Open source →-
New methods on
Menu: -
submenufor submenus with optional headers
-
voidandvoidIffor empty list items
-
wrapto wrap the menu in an html tag with optional attributes
-
- A
blueprintmethod to copy the menu without it's contents
- A
-
- Html item convenience methods:
addItemClass,setItemAttribute
- Html item convenience methods:
-
- Html parent convenience methods:
addItemParentClass,setItemParentAttribute
- Html parent convenience methods:
-
Added
HasHtmlAttributesandHasParentAttributesinterfaces -
HtmlAttributesandParentAttributesnow also have asetAttributesmethod
-
-
1.1.104 Apr 2016 -
1.1.030 Mar 2016 -
1.0.024 Mar 2016 -
0.6.624 Mar 2016Nothing published for this version
-
0.6.521 Mar 2016Nothing published for this version
-
0.6.418 Mar 2016Nothing published for this version
-
0.6.318 Mar 2016Nothing published for this version
-
0.6.218 Mar 2016Nothing published for this version
-
0.6.118 Mar 2016Nothing published for this version
-
0.6.018 Mar 2016Nothing published for this version
-
0.5.314 Mar 2016Nothing published for this version
-
0.5.211 Mar 2016Nothing published for this version
-
0.5.111 Mar 2016Nothing published for this version
-
0.5.010 Mar 2016Nothing published for this version
-
0.4.109 Mar 2016Nothing published for this version
-
0.4.009 Mar 2016Nothing published for this version
-
0.3.009 Mar 2016Nothing published for this version
-
0.2.009 Mar 2016Nothing published for this version
-
0.125 Feb 2016Nothing published for this version