JSON:API Frontend Layout Builder
This module provides a way for headless Drupal sites to render pages using Layout Builder. It exposes a JSON:API endpoint that returns a structured representation of the layout, including sections and blocks, which can then be used by a frontend application to build the page.
jsonapi_frontend_layout is an optional add-on for jsonapi_frontend that enables true headless Layout Builder rendering by exposing a normalized layout tree
API.
Features
- Adds
GET /jsonapi/layout/resolve?path=/about-us&_format=json - Uses
jsonapi_frontendfor alias/redirect/language negotiation + access checks - When applicable, returns a
layouttree (sections + components) alongside the normal resolver contract - MVP component support: field blocks and inline blocks (returns JSON:API references for block content when possible)
Post-Installation
- Install and enable
jsonapi_frontendandlayout_builder. - Enable Layout Builder for a bundle’s display (Manage display → enable Layout Builder).
- Request:
GET /jsonapi/layout/resolve?path=/your-page&_format=json - In your frontend: use the returned
layouttree to render sections/components, and fetch any referenced JSON:API URLs. li>
Additional Requirements
- jsonapi_frontend
- Core: Layout Builder, Block Content
Recommended modules/libraries
- Next.js starter (example renderer): https://github.com/code-wheel/
jsonapi-frontend-next - Astro starter (example renderer): https://github.com/code-wheel/jsonapi-frontend-astro
- TypeScript client helper: https://www.npmjs.com/package/@codewheel/jsonapi-frontend-client
Similar projects
Most decoupled approaches either (a) keep Layout Builder pages Drupal-rendered (hybrid) or (b) require custom per-site APIs. This module
provides a consistent, resolver-aligned layout tree endpoint designed for modern frontends.
Supporting this Module
Report issues and feature requests in the issue queue.
Community Documentation
Depends on
Dependencies of the latest stable release
- JSON:API Frontend
- block_content Drupal core
- layout_builder Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Release Timeline
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.3 | Stable | 10–11 | Jun 12, 2026 | ||
| 1.0.2 | Stable | 10–11 | Jun 12, 2026 | ||
| 1.0.1 | Stable | 10–11 | Fix layout resolver Content-Type to application/json; expanded test coverage; CI/security scanning + docs updates. | Jan 4, 2026 | |
| 1.0.0 | Stable | 10–11 | Initial release | Jan 3, 2026 |