Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Canvas Tailwind

No security coverage Under active development 1 sites

Part of the Canvas ecosystem · 49 projects

This module integrates Tailwind CSS builds for Drupal themes and Canvas code components, ensuring a single shared build. It scans templates and components together to generate one stylesheet, uses a unified set of design tokens across the site and previews, and prevents duplicate Preflight styles.

Canvas Tailwind gives a site one Tailwind build shared by its theme and its Drupal Canvas code components: one set of design tokens, one stylesheet, one preflight.

The problem

Canvas compiles Tailwind for code components in the browser. A Tailwind theme compiles its own on the command line. The two builds know nothing about each other, so you get two copies of preflight competing, tokens defined in two places that drift apart, and utility classes used only inside a code component that never make it into the stylesheet at all.

What it does

Templates and code components are scanned together, against one configuration, into one stylesheet that serves both. Tokens are declared once, in the theme's @theme block, and apply everywhere — including Canvas' live preview.

Usage

Enable the module, install its front-end dependencies, then build from your theme's directory:

npx canvas-tailwind            # build
npx canvas-tailwind --watch    # rebuild on changes
npx canvas-tailwind --check    # CI: fail if the built CSS is stale

Common Tailwind v4 entrypoints are detected automatically; a theme can name its own entry point in the theme's .info.yml:

canvas_tailwind:
  entry: css/styles.css

Ask your assistant about Canvas Tailwind

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
3
Tracked since
Aug 2026
Latest release
3 months ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

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