Skip to main content
Webhaven

Main navigation

  • Home
  • Who it's for
    • For Experts
    • For Agencies
    • For Starters
  • ROI calculator
  • Docs
  • Get launch notified
Just launched the Webhaven demo website. Check it out! 🚀

Breadcrumb

  1. Home
  2. Webhaven documentation
  3. Theming
  4. Create a custom theme

Documentation

  • Documentation
    • Welcome
  • Get started
    • What is Webhaven?
    • Installation
  • Configuration
    • Drupal Canvas
    • Site settings
  • Theming
    • Introduction
    • Theme structure
    • Create a custom theme
    • Single Directory Components (SDC)
    • Component structure
    • An example component
  • Handy resources
    • Roadmap
    • What are Drupal recipes?
    • What is a Drupal site template?
    • What is Drupal Canvas?
    • Drupal Canvas vs Layout Builder vs Paragraphs
    • What is DDEV?
    • Useful DDEV commands
    • What is Drush?
    • Useful Drush commands

Create a custom theme

Discover how you can create your own custom Drupal theme based on Webhaven starterkit in just a few steps.

Generate your theme

The only thing you need to do is run the following command from your project root, replacing lollapalooza with your theme's machine name:

ddev create-theme lollapalooza

The command automatically handles everything:

  • Generates a new theme based on the Webhaven starterkit
  • Installs its Node dependencies
  • Creates .env.local with your project's DDEV URL
  • Enables the theme and sets it as the default
  • Migrates Canvas components to your new theme
  • Clears caches

Tip: enable dev mode (ddev dev-mode) while theming. It turns off caching and CSS/JS aggregation and enables Twig debug, so you see your changes immediately.

Build your theme

To compile all files and watch for changes with BrowserSync run:

npm run watch

To build for development run:

npm run dev

To build for production run:

npm run build

Linting and formatting

Linting checks your code for errors and bad practices. Formatting automatically rewrites your code to a consistent style. Running these regularly keeps your theme code clean and maintainable.

To format and lint your JavaScript and component files:

npm run biome:check

Or run them separately:

npm run biome:format
npm run biome:lint

To lint your SCSS files run:

npm run stylint

To automatically fix SCSS lint issues run:

npm run stylint-fix

You've seen how it works. Now see what it's worth.

See how much time and money Webhaven saves on every Drupal project.
Calculate my savings
Webhaven
Ship your best Drupal work, faster.

Links

  • Who it's for
  • Get launch notified
  • Docs
  • Free tools
  • Blog
  • Get in touch

Follow on

  • drupal profile
  • linkedin profile
  • x_twitter profile
© 2026 Webhaven.
All rights reserved.

Legal

  • Privacy policy
  • Terms of service
  • Accessibility
  • Login
Built with