Drupal is a registered trademark of Dries Buytaert
drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! linkit 7.0.14 Minor update available for module linkit (7.0.14). migrate_tools 6.1.4 Minor update available for module migrate_tools (6.1.4). diff 2.0.0 Major update available for module diff (2.0.0). masquerade 8.x-2.2 Minor update available for module masquerade (8.x-2.2). video_embed_field 3.1.0 Minor update available for module video_embed_field (3.1.0). bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). colorbox_inline 2.1.1 Minor update available for module colorbox_inline (2.1.1). node_view_permissions 8.x-1.7 Minor update available for module node_view_permissions (8.x-1.7).

sdx

4 sites No security coverage
View on drupal.org

SDX extends Drupal's Single Directory Components with React, Vue, and Svelte. Write components using modern JavaScript frameworks inside Drupal's SDC structure. SDX handles the build pipeline, mounting, hydration, and server integration.

Drop a single component into a Twig template with {{ sdx('my_theme:hero', {title: node.label}) }}, or go all-in and replace Twig entirely with a full framework-powered theme engine. SDX scales from one interactive widget to a complete single-page application. Your choice, not the framework's.

Why SDX

Drupal has the best content modeling, access control, and editorial workflow of any CMS. What it lacked was a modern frontend story that doesn't force you to decouple.

SDX fixes that. You get the component model, reactivity, and developer experience of modern frameworks, built natively on Drupal's plugin system, render pipeline, and cache infrastructure. No REST API to maintain. No separate frontend deployment. No lost Drupal features.

  • Progressive adoption: start with one component in a Twig template, scale to a full SPA. No architecture commitment upfront.
  • Framework choice: React, Vue, or Svelte via a plugin system. Any framework can be added as a contrib module.
  • No decoupling tax: keep Drupal's admin UI, permissions, contextual links, cache tags, and editorial workflows. SDX components are Drupal components.
  • Production SSR: clustered Node.js server with cache tag integration, circuit breaker, and streaming. Instant first paint, then hydration.
  • Reactive without JavaScript: build interactive components in pure PHP with server-owned state, actions, and computed properties.

Features

Component System

  • Use SDX components from any Twig template: {{ sdx('my_theme:chart', {data: values}) }}
  • React 18+, Vue 3, and Svelte 5 via a plugin architecture
  • Components live in Drupal's standard SDC directory structure
  • Automatic library generation, no manual .libraries.yml entries
  • Schema-driven props with validation from component.yml

Build Pipeline

  • Vite with Hot Module Replacement (HMR) for development
  • Automatic import maps, vendor bundles, and code splitting
  • SCSS/Sass and PostCSS support
  • TypeScript support with type generation from component schemas
  • Cross-extension import aliases: @theme:aurora/, @module:my_module/

SPA Navigation (sdx_router)

  • Client-side navigation with scoped partial page responses
  • Prefetch on hover for instant page transitions
  • Form interception with AJAX batch and modal support
  • Server-declared scope (content/page/full), no client-side URL heuristics
  • Automatic full reload on theme boundary crossings

Server-Side Rendering (sdx_ssr)

  • Framework-agnostic: works with React, Vue, or Svelte
  • Clustered Node.js server (1 worker per CPU, zero-downtime restart)
  • LRU render cache with Drupal cache tag integration. Entity saves surgically invalidate cached renders
  • Circuit breaker: 3 failures opens a 30s cooldown, automatic recovery
  • Works with or without the theme engine. SSR for a single Twig-embedded component or a full page

Reactive Components: Livewire for Drupal (sdx_reactive)

  • Build interactive components in pure PHP + Twig, zero JavaScript required
  • Server-owned state with #[ReactiveState] properties
  • Server-side actions with #[ReactiveAction] methods
  • Computed properties with #[Computed]
  • Three transport modes: props (JS framework re-render), morph (server HTML diff), realtime (shared state)

Theme Engine (sdx_drast, separate project)

  • Replaces Twig entirely. All rendering produces structured JSON, not HTML strings
  • Write React/Vue templates for any Drupal theme hook (block.tsx, form-element.tsx, etc.)
  • Self-contained structured tokens survive Drupal's render cache
  • DataProvider plugin system for typed, optimized route-level data
  • Region-level partial reloads via cache tag checksums
  • See SDX DRAST for details

Developer Experience

  • Setup wizard guides framework, bundler, and package manager selection
  • drush sdx:doctor diagnoses issues with actionable fixes
  • drush sdx:build compiles all components in one command
  • drush sdx:dev starts a dev server with hot reload (auto-detects DDEV)
  • drush sdx:create-component scaffolds new components
  • Dashboard with build status, dependency management, and component overview
  • Developer toolbar showing mount state, props, and performance
  • npm, Yarn, pnpm, and Bun via pluggable package manager submodules

How It Works

Option 1: Components in Twig.

Keep your existing Twig theme. Add SDX components where you need interactivity.

{{ sdx('my_theme:search', {endpoint: '/api/search', placeholder: 'Search...'}) }}

The component renders as a mount container. The JS framework hydrates it on the client. If SSR is enabled, the component is pre-rendered on the server for instant first paint.

Option 2: Full theme engine.

Replace Twig entirely. Write React/Vue/Svelte templates for every Drupal theme hook. Get SPA navigation, partial reloads, and structured data throughout. Requires the separate SDX DRAST module.

Post-Installation

After enabling the module, a setup wizard will guide you through selecting your stack:

  • Framework: React, Vue, or Svelte
  • Bundler: Vite (selected automatically)
  • Package Manager: npm, Yarn, pnpm, or Bun (only detected options shown)
  • Features: optional submodules like SSR, TypeScript, Reactive, Storybook, Router, etc.

Then run:

drush sdx:doctor    # Verify your environment
drush sdx:build    # Compile components
drush sdx:dev      # Start dev server with HMR

For DDEV users, expose the Vite port in .ddev/config.yaml:

web_extra_exposed_ports:
  name: vite 
  container_port: 5173
  http_port: 5173 
  https_port: 5174

Additional Requirements

  • Drupal 10.3+ or 11
  • PHP 8.3+
  • Node.js 18+ for building components and running the dev server
  • npm, Yarn, pnpm, or Bun for managing JavaScript dependencies
  • Drush 13+ required for all CLI commands
  • Private file system must be configured in settings.php ($settings['file_private_path'])
  • BigPipe (core) for optimal caching with reactive components
  • Layout Builder (core) for placing SDX components as blocks in layouts
  • SDX DRAST full structured rendering theme engine

Similar projects

Single Directory Components (SDC) is part of Drupal core. SDC provides component discovery and Twig rendering. SDX adds JavaScript framework integration, build tooling, SSR, and reactivity on top.

React Drupal provides basic React integration. SDX provides the full stack: build pipeline, SSR, SPA navigation, reactive components, and multi-framework support.

Livewire for Drupal has similar goals to sdx_reactive. SDX's reactive module is inspired by Laravel Livewire but built natively on Drupal's plugin and component systems, with multiple transport modes.

Next.js / Nuxt decoupled: SDX achieves the same frontend experience without decoupling. You keep Drupal's admin, permissions, caching, and editorial features intact.

Supporting this Module

Report bugs and feature requests in the issue queue.

Contributions welcome. The plugin architecture makes it straightforward to add new frameworks, bundlers, and features as separate submodules.

The project follows Drupal coding standards and uses PHPUnit for testing.

Community Documentation

- Coming Soon -

Activity

Total releases
10
First release
Mar 2026
Latest release
1 week ago
Release cadence
5 days
Stability
0% stable

Release Timeline

Releases

Version Type Release date
1.0.0-alpha10 Pre-release May 5, 2026
1.0.0-alpha9 Pre-release May 4, 2026
1.0.0-alpha8 Pre-release Apr 29, 2026
1.0.0-alpha7 Pre-release Apr 28, 2026
1.0.0-alpha6 Pre-release Apr 24, 2026
1.0.0-alpha5 Pre-release Apr 23, 2026
1.0.0-alpha4 Pre-release Apr 20, 2026
1.0.0-alpha3 Pre-release Apr 17, 2026
1.0.0-alpha2 Pre-release Apr 11, 2026
1.0.0-alpha1 Pre-release Mar 25, 2026