Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

JSON:API Frontend Menu

2 sites No security coverage Drupal 10–11
View on drupal.org

This module provides a JSON endpoint for decoupled frontends to fetch a ready-to-render menu tree, ensuring only accessible links are returned and optionally providing active trail information. It can also include routing hints for seamless integration with hybrid setups.

JSON:API Frontend Menu is an optional add-on for jsonapi_frontend">jsonapi_frontend that exposes a ready-to-render menu tree for decoupled frontends.

Features

  • Menu tree JSON endpoint: nested children structure (no client-side tree building required).
  • Role-aware filtering: only returns links the current Drupal user can access (no “leaky” menu items).
  • Active trail (optional): pass path to mark active and in_active_trail.
  • Hybrid routing hints (optional): per-link resolve output compatible with /jsonapi/resolve
    (includes headless, jsonapi_url/data_url, or drupal_url).
  • Cache-safe defaults: anonymous responses can be cached; authenticated responses are no-store.

Post-Installation

Install and enable the module, then call the endpoint from your frontend:

composer require drupal/jsonapi_frontend_menu
drush en jsonapi_frontend_menu

Examples:

GET /jsonapi/menu/main?_format=json
GET /jsonapi/menu/main?path=/about-us&_format=json

Optional query parameters:

  • path: compute active trail flags for the current page.
  • langcode: forwarded to the resolver for alias/language resolution.
  • min_depth / max_depth: limit returned depth.
  • parent: return a subtree under a specific parent plugin id.
  • resolve=0: skip per-link resolver decoration for maximum performance/caching.

Additional Requirements

Similar projects

  • jsonapi_menu_items: exposes menu links via JSON:API Resources. This module focuses on a turnkey frontend contract: nested tree + optional active trail + optional /jsonapi/resolve style routing hints.

Supporting this Module

Please file issues and patches in the project issue queue. Contributions and co-maintainers are welcome.

Community Documentation

  • jsonapi_frontend project page and documentation
  • Migration guide: see the MIGRATION.md in the project repository

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Jan 2026
Latest release
2 months ago
Releases (12 mo)
5 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.5 Stable 10–11 Jun 12, 2026
1.0.4 Stable 10–11 Jun 12, 2026
1.0.3 Stable 10–11 Jan 4, 2026
1.0.2 Stable 10–11 Jan 2, 2026
1.0.1 Stable 10–11 Jan 2, 2026