NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #3577 most downloaded on Packagist
Html menu generator
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
11 years old
55 releases · first in 2016
ci: fix deprecations in the ci and improve it by @Chris53897 in #152
Full Changelog: 3.2.0...3.2.1
One column per quarter.
Full Changelog: https://github.com/spatie/menu/compare/3.2.0...3.2.1
Make ->setExactActive() accept a callable as well by @ralphjsmit in #146
->setExactActive() accept a callable as well by @ralphjsmit in #146Full Changelog: 3.1.1...3.2.0
->setExactActive() accept a callable as well by @ralphjsmit in https://github.com/spatie/menu/pull/146Full Changelog: https://github.com/spatie/menu/compare/3.1.1...3.2.0
Add id to docs by @milwad-dev in #144
id to docs by @milwad-dev in #144Full Changelog: 3.1.0...3.1.1
id to docs by @milwad-dev in https://github.com/spatie/menu/pull/144Full Changelog: https://github.com/spatie/menu/compare/3.1.0...3.1.1
typofix in item-attributes.md by @davidjr82 in #138
id attribute for menu by @milwad-dev in #143Full Changelog: 3.0.1...3.1.0
id attribute for menu by @milwad-dev in https://github.com/spatie/menu/pull/143Full Changelog: https://github.com/spatie/menu/compare/3.0.1...3.1.0
update deps
Use PHP 8 syntax where possible
Ensure Items are transformed to string before prepending or appending
Items are transformed to string before prepending or appendingFix methods_exists check in PHP8
methods_exists check in PHP8Ensure the necessary methods exist to check if a menu is active
Support Item instances in Menu::prepend so headers can be set active
Item instances in Menu::prepend so headers can be set activeDrop support for versions older than PHP 7.1
Add exact-active class to links that exactly match the current URL. This is accompanied by a setExactActiveClass(string $class) method to set the clas
exact-active class to links that exactly match the current URL. This is accompanied by a setExactActiveClass(string $class) method to set the class nameAdd IteratorAggregate interface to Menu class
IteratorAggregate interface to Menu classAdd beforeRender and willRender hooks that are called when an item is rendered
beforeRender and willRender hooks that are called when an item is renderedThis release adds a few methods to create non-ul menus, which allows for Bootstrap 4 compatibility
ul menus, which allows for Bootstrap 4 compatibilityMenu::setWrapperTag and Menu::withoutWrapperTag to set a custom wrapper tag name for the menu list. Default: ulMenu::setParentTag & Menu::withoutParentTag to determine which tag should be used for the item's parent element. Default: liMenu::setActiveClassOnLink and Menu::setActiveClassOnParent to determine where the active class should be appliedAllow invokable classes as callbacks
Added Menu::empty and Html::empty method for adding empty list items
Menu::empty and Html::empty method for adding empty list itemsExtracted a ActiveUrlChecker class for public use
ActiveUrlChecker class for public useAdded append and prepend methods to Link
append and prepend methods to LinkFixed returning a menu instance is now optional with fill and build
fill and buildFixed setting items active with urls that start with the same string
- Added if function
if functionFixed setting an active url when the url is exactly the same
Nothing published for this version
Added the request root path when setting the active path
Added optional third $initial parameter in Menu::build
$initial parameter in Menu::buildFixed require ^1.0.0 of spatie/url
^1.0.0 of spatie/urlAdded added the static Menu::build and non-static Menu::fill methods to create menu's from arrays.
Menu::build and non-static Menu::fill methods to create menu's from arrays.setActive method on Activatable now also accepts a non-strict boolean or callable parameter to set $active to true or false.Menu::html and Menu::htmlIf now accept a $parentAttributes array as their second arguments.HtmlAttributes and ParentAttributes traits have been renamed to HasHtmlAttributes and HasParentAttributes.HasUrl interface and trait has been removed. Url-related methods now also are part of the Activatable interface and trait.void and voidIf have been removed. These can be replaced by html and htmlIf, with empty strings as their first argumentsprefixLinks and prefixUrls methods 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 with applyToAll.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Deprecated prefixLinks in favor of prefixUrls
HasUrl traitprefixLinks in favor of prefixUrls- Added submenuIf
submenuIf- Internal refactors
- submenu for submenus with optional headers
New methods on Menu:
submenu for submenus with optional headersvoid and voidIf for empty list itemswrap to wrap the menu in an html tag with optional attributesblueprint method to copy the menu without it's contentsaddItemClass, setItemAttributeaddItemParentClass, setItemParentAttributeAdded HasHtmlAttributes and HasParentAttributes interfaces
HtmlAttributes and ParentAttributes now also have a setAttributes method
Fixed setActive when setting active from a URL
setActive when setting active from a URLAdded conditional add functions, addIf, linkIf and htmlIf
add functions, addIf, linkIf and htmlIf- First release
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →