Headless Block Styles
Headless Block Styles brings full Gutenberg block styling to any headless frontend (e.g. Next.js) using the WordPress REST API — no WPGraphQL required.
Utiliser avec prudence
Headless Block Styles works, but test it on a staging site before relying on it in 2026. Was last updated 4 months ago, and scores 49/100 on our health check.
- Petite base d'utilisateurs (<10 installations actives)
- Très peu de critiques jusqu'à présent
Comment s'accumule-t-il ?
Côte à côte sur les installations, les mises à jour, les évaluations et le supportTéléchargements quotidiens
Les pics de téléchargement suivent généralement une nouvelle version - chaque site qui met à jour automatiquement compte comme un téléchargement.
Classements
Where Headless Block Styles stands todayWordPress.org Classements de recherche
Position en direct dans la recherche de plugins, Top 100| Mot-clé | Position |
|---|---|
| blocs | >100 |
| decoupled | #36 |
| Gutenberg | >100 |
| headless | #73 |
| API REST | >100 |
About Headless Block Styles
À partir du Lisezmoi officiel · v0.1.0Description
Headless Block Styles brings full Gutenberg block styling to any headless frontend (e.g. Next.js) using the WordPress REST API — no WPGraphQL required.
It does two things:
- Serves the global stylesheet (
wp_get_global_stylesheet()): all--wp--preset--*CSS variables, preset classes (has-*-color,has-*-font-size, …), and theme/user styles — the CSS WordPress would normally enqueue on its own frontend. - Computes per-block inline styles on the server with the WordPress Style Engine and adds a
block_datafield to post REST responses, so your frontend receives ready-to-spread React style objects instead of deriving them from raw block attributes in JavaScript.
Reste API
GET /wp-json/headless-block-styles/v1/stylesheet
types— comma-separated subset ofvariables,presets,styles,base-layout-styles. Omit for all.format—json(default) orcss(raw CSS, usable directly in a<link>tag).
GET /wp-json/headless-block-styles/v1/theme
Returns merged theme.json settings (wp_get_global_settings()) — color palette, font sizes, layout sizes.
block_data field on posts and pages
Every REST-enabled post type response gains a block_data field: the parsed block tree where each block carries inlineStyles (camelCase, ready for a React style prop), classNames (editor-parity has-* classes), attributes, innerHTML, and recursive innerBlocks.
inlineStyles covers the `style` attribute (spacing, borders, typography, colors — via the WP Style Engine), preset attributes (`backgroundColor`, `textColor`, `gradient`, `borderColor`, `fontSize`, `fontFamily`), and layout (`width`, `height`, `layout.contentSize/wideSize/justifyContent`).
rendered_blocks field on posts and pages
For rendering WordPress’s HTML faithfully: returns html, css, and svg — the rendered block markup together with the block-support CSS WordPress generates at render time (layout container rules, element link/button colors, duotone filters) and the duotone SVG definitions. On a normal WordPress frontend this CSS is printed in a <style> tag and never reaches REST consumers; here it is captured from the same render as the returned HTML so the generated class names always match.
Not needed on a request? Exclude fields: /wp/v2/posts?_fields=id,title,content.
Filtres
headless_block_styles_block_inline_styles— modify a block’s computed style object. Args:$styles,$attrs.headless_block_styles_block_class_names— modify a block’s computed class names. Args:$classnames,$attrs.headless_block_styles_post_types— which post types get theblock_datafield.
Full documentation and Next.js usage examples: github.com/FuSan21/headless-block-styles
Installation
- Upload the
headless-block-stylesfolder to/wp-content/plugins/, or install via Plugins → Add New. - Activate the plugin through the Plugins menu.
- Fetch
/wp-json/headless-block-styles/v1/stylesheetfrom your frontend and inject the CSS, and readblock_datafrom your post/page REST responses.
Journal de modifications
0.1.0
- Initial release: global stylesheet and theme settings REST endpoints,
block_dataREST field with server-computed inline styles and class names,rendered_blocksREST field capturing render-time block-support CSS and duotone SVG.
Pour les développeurs
Est-ce votre plugin ? Montrez les chiffres.
Ajoutez un badge en direct à votre site, docs ou github readme. Il se met à jour par lui-même - aucun compte n'est nécessaire.
Best Headless Block Styles alternatives
Plugins Tous les blocs →FAQ
Headless Block Styles: quick answers
Réponses directes, extraites des données en direct WordPress.org.
Source : WordPress.org
Is Headless Block Styles free?
Yes. Headless Block Styles is free to download and use from the official WordPress.org plugin directory.
Is Headless Block Styles safe to use in 2026?
Headless Block Styles works, but test it on a staging site before relying on it in 2026. Was last updated 4 months ago, and scores 49/100 on our health check.
How many websites use Headless Block Styles?
Headless Block Styles is active on <10 WordPress websites and has been downloaded 312 times since it launched in July 2026. It was downloaded 70 times in the last 30 days.
Does Headless Block Styles work with WordPress 7.1?
Headless Block Styles is officially tested up to WordPress 7.0.9, while the latest release is 7.1.5. It may still work, but try it on a staging site first.
What PHP version does Headless Block Styles need?
Headless Block Styles requires PHP 7.4 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.
When was Headless Block Styles last updated?
The latest version, 0.1.0, was released on July 21, 2026 (4 months ago).
Who makes Headless Block Styles?
Headless Block Styles is developed and maintained by fusan.
What are the best alternatives to Headless Block Styles?
The most popular alternatives to Headless Block Styles are Spectra Legacy (1M+ installs), Kadence Blocks (600K+ installs) and Extendify (500K+ installs).
Propulsé par PageForge
Un modèle et une feuille de calcul. Une vraie page pour chaque recherche.
PageForge transforme chaque ligne d'un CSV en une page WordPress avec son propre titre, URL, SEO et schéma, construit sur la mise en page que vous Déjà conçu. Gratuit sur WordPress.org.
- CSV et XLSX, plus Google Sheets sur les professionnels et les entreprises
- Son propre titre, URL, SEO champs et schéma pour chaque page
- Fonctionne avec l'éditeur de blocs, Elementor, Divi et Avada
- Gratuit sur WordPress.org, pas de carte de crédit
