A collection of CMS React examples for building on the HubSpot CMS.
This repo demonstrates how to build React modules and "islands" for the HubSpot CMS. You'll find step-by-step examples, best practices, and customizable boilerplates to get you up and running quickly.
- Official HubSpot CMS React docs: https://developers.hubspot.com/docs/guides/cms/react/overview
Each folder under examples/
is a standalone example focused on a specific use case or feature. If you are just getting started with CMS React, the following examples are the best places to start:
- getting-started-project-theme Building a CMS theme with React and Projects
- getting-started Building a standalone Project with React modules that can be used across CMS themes
If you want to bootstrap a new Project with CMS React you can run npx @hubspot/create-cms-theme@latest
which will create a Project starting point for you to build upon. Learn More
We welcome bug reports and PRs to update or add new examples:
- Fork this repo
- Create a feature branch (
git checkout -b my-new-example
) - Commit your changes (
git commit -m "Add amazing example"
) - Open a PR
Chat with the community on Slack: https://developers.hubspot.com/docs/getting-started/slack/developer-slack