Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: Editoria11y Accessibility Checker 3.0.10 — Minor update available for module editoria11y (3.0.10). Release: Editoria11y Accessibility Checker 2.2.24 — Minor update available for module editoria11y (2.2.24). Release: Leaflet 10.4.13 — Minor update available for module leaflet (10.4.13). Release: Flag 5.1.1 — Minor update available for module flag (5.1.1). Release: Layout Paragraphs 3.0.0-beta5 — New beta version released for module layout_paragraphs (3.0.0-beta5). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

This module makes React code components built with Drupal Canvas reusable throughout your Drupal site. It allows you to use these components in various Drupal templates, render arrays, and PHP code, enabling consistent theming across your entire project.

Drupal Canvas lets you build React code components in the browser, but they can only be placed using Canvas.. This module registers each one as a Single Directory Component, so the rest of your site can use them too.

Use it to theme anything Canvas doesn't reach:

  1. Node, term, user, media and Commerce templates — node--article.html.twig, field--*.html.twig
  2. Views row and field templates
  3. Blocks, regions, menus, page.html.twig, html.html.twig
  4. Any render array, from a preprocess function, block plugin, field formatter, controller or Layout Builder

From a Twig template:

{{ include('code_component:hero', { title: 'Hello' }) }}

Or from PHP:

$build['promo'] = [
  '#type' => 'component',
  '#component' => 'code_component:hero',
  '#props' => ['title' => 'Hello'],
];

Props and slots come straight from the code component, and rendering reuses Canvas's own hydration, so a component behaves the same whether it is placed in Canvas or called from a template.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Aug 2026
Latest release
1 month ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.0-alpha1 Pre-release 11 Aug 9, 2026
1.0.x-dev Dev 11 Aug 9, 2026