Drupal Radix Theme
  • Introduction
    • Overview & Support
  • Installation
    • Requirements
    • Getting Started
    • Setup with ddev
  • Understanding Radix
    • Individual files and directories
    • Bootstrap Build
    • Bootswatch
  • Working with the components
    • Components: Intro
    • Components: A deep dive
    • An example component
    • The drupal-radix-cli
    • Copy and modify a component
  • Components
    • Accordion
    • Alerts
    • Badge
    • Block
    • Buttons
    • Button Group
    • Breadcrumb
    • Card
    • Carousel
    • Close button
    • Comment
    • Collapse
    • Details
    • Dropdown menu
    • Field
    • Field Comment
    • Fieldset
    • Figure
    • Form
    • Form: Element
    • Form Element Label
    • Form Element: Radio Checkbox
    • Heading
    • HTML
    • Image
    • Input
    • List group
    • Local Tasks
    • Media
    • Modal
    • Nav
    • Nav Item
    • Navbar
    • Navbar Brand
    • Node
    • Offcanvas
    • Page
    • Page: Content
    • Page: Footer
    • Page: Navigation
    • Page: Title
    • Pagination
    • Progress
    • Radios
    • Region
    • Select
    • Spinners
    • Table
    • Taxonomy
    • Textarea
    • Toasts
    • Tooltips
    • User
    • Views: view
    • Views: view--grid
    • Views: view--table
    • Views: view--unformatted
  • Misc
    • Migration and upgrading
    • Roadmap
    • Credits & Contributions
Powered by GitBook
On this page

Was this helpful?

  1. Installation

Getting Started

Installing and setup of Radix

PreviousRequirementsNextSetup with ddev

Last updated 24 days ago

Was this helpful?

In case you are using ddev or lando you have to prefix the commands below with it.

  1. Download and enable the Radix theme:

composer require 'drupal/radix:^6.0'
  1. Create a sub-theme using Drush (Considering you are using ):

drush --include="web/themes/contrib/radix" radix:create SUBTHEME_NAME
  • Note that SUBTHEME_NAME is the name of the theme you'll be working with, make sure ideally the name is in lowercase letters.

  • Note the path in the --include flag, if your Drupal is installed in web directory following core-recommended project, it's fine, otherwise if you are using anything else like docroot change it accordingly.

  • Once you've run the radix:create command you'd be shown a caveat as shown below that walks you through the next steps:

  1. Set the default theme to your newly created theme:

drush then SUBTHEME_NAME -y; drush config-set system.theme default SUBTHEME_NAME -y
  1. Go to the newly created theme directory:

cd web/themes/custom/SUBTHEME_NAME
  1. Switch to the appropriate node version using nvm:

nvm use
  • If you don't have the specific node version required by the theme, you'll be shown a message like below: nvm use Found 'radix/web/themes/custom/SUBTHEME_NAME/.nvmrc' with version <lts/iron> N/A: version "lts/jod -> N/A" is not yet installed.

    You need to run nvm install lts/jod to install it before using it. Run nvm install lts/jod to make sure you have the latest LTS version of Node 22 installed.

  1. Install the required packages:

npm install
  1. In the root of the theme, create a copy of the .env.example and rename it to .env.local:

cp .env.example .env.local
  1. Update the DRUPAL_BASE_URL variable in your .env.local to point to your localhost address (this file is .gitignored by default to avoid conflicts) - e.g. myproject.local or myproject.ddev.site

  2. For the development phase:

npm run watch
  1. For the production phase:

npm run production
drupal/recommended-project
radix:create caveat