Skip to content

HubSpot CMS React ​

Starter React + HubL themes on HubSpot’s developer projects platform (2025–2026).

Prerequisites ​

  • Node.js 18+
  • HubSpot account (CMS sandbox recommended)
  • Comfortable with React + terminal

Create a project ​

bash
cd ~/Dev/Themes
npx @hubspot/create-cms-theme@latest

The script will:

  1. Scaffold a JS/React theme with sample components
  2. Install HubSpot CLI if needed
  3. Install dependencies
  4. Authenticate (personal access key → ~/.hscli/config.yml)

Shape (simplified) ​

text
projectName/
├── hsproject.json
└── src/
  └── theme/
    ├── theme-hsmeta.json
    └── my-theme/
      ├── components/
      ├── styles/
      ├── templates/
      ├── fields.json
      ├── package.json
      └── theme.json

Local development server ​

bash
cd projectName
npm run start

Open the URL the CLI prints (commonly http://hslocal.net:3000). Preview modules → View local version; saves hot-reload.

Upload & open in HubSpot ​

bash
hs project upload
hs project open

By default projects may auto-deploy after a successful build — check Project → Settings if you want manual hs project deploy.

Create a page ​

In HubSpot: Content → Website Pages → set your uploaded theme active → pick the starter React template → edit in the visual editor.

Iterate ​

bash
# edit components/styles locally
npm run start          # preview
hs project upload      # build + deploy to account

Official quickstart ​