The quickest way to start playing around with Primer React
49
stars
301
commits
JavaScript
primary language
Sep 11, 2026
updated
The easiest way to build a prototype from scratch with Primer React and deploy with GitHub Pages.
Perfect for quick prototyping with code, and setup to be visible only for signed-in Hubbers. Works (mostly) out of the box!
Built using vite.dev, see their docs if you want to customize any configuration (you shouldn't have to).
Create a codespace for your prototype by clicking Use this template > Open in a codespace
In the codespaces terminal, run:
npm install
npm run dev
Once npm run dev is running, go to the PORTS tab in the terminal and open the URL for your prototype:

If the PORTS tab is not visible for you, right-click next to the other tabs and enable it in the dropdown menu:

This is a temporary URL that's only live while npm run dev is running in your Codespace.
To make the URL accessible for others, change its visibility:

To share a permanent URL, see Get Started (Local development) below.
If you try to git push from your codespace terminal, you will notice there is no repository associated with it.
To save your work, create a new empty repository owned by @github and set your codespace to it by running:
git remote add origin git@github.com:github/YOUR_REPO_NAME.git
git branch -M main
git push -u origin main
Once you have a repository saved, you should finish the configuration under Deploying your prototype.
You don't need to develop locally, however. You can always keep building in the browser, just choose the Coodespaces tab under the Code button:

Create a repository for your prototype by clicking Use this template > Create a new repository
Set the repository Owner as github so that the deployment is only enabled for Hubbers. Choose whatever name you want.
Clone your new repo locally
You need to have nodejs installed on your machine. If you don't, head here and choose macOS installer.
Once you have the repository cloned on your machine, open the folder on VSCode or the terminal and run:
npm install
npm run dev
You will see the site running on http://localhost:1234
You need to change a few settings on GitHub.com for your prototype to be deployed & visible. This cannot be automated at the moment unfortunately!



/pages folder and rename it to whatever.jsx. Now head to localhost:1234/whatever and you will see your new page loadednpm: command not foundIf you try to run npm install and get an error similar to the one described above, that means you don't have Node/npm installed on your machine. In that case, head here to download it. Choose macOS installer for the simplest option.
Please open an issue or send a message on #primer in Slack (staff only). This repository is built to be a simple prototyping experience for designers and other non-developers. If it doesn't work out of the box, the template is wrong, not you -- please reach and the Primer team will help!
JavaScript
45.0%
HTML
26.3%
CSS
22.1%
Dockerfile
4.4%
TypeScript
2.3%
The quickest way to start playing around with Primer React
49
stars
301
commits
JavaScript
primary language
Sep 11, 2026
updated
The easiest way to build a prototype from scratch with Primer React and deploy with GitHub Pages.
Perfect for quick prototyping with code, and setup to be visible only for signed-in Hubbers. Works (mostly) out of the box!
Built using vite.dev, see their docs if you want to customize any configuration (you shouldn't have to).
Create a codespace for your prototype by clicking Use this template > Open in a codespace
In the codespaces terminal, run:
npm install
npm run dev
Once npm run dev is running, go to the PORTS tab in the terminal and open the URL for your prototype:

If the PORTS tab is not visible for you, right-click next to the other tabs and enable it in the dropdown menu:

This is a temporary URL that's only live while npm run dev is running in your Codespace.
To make the URL accessible for others, change its visibility:

To share a permanent URL, see Get Started (Local development) below.
If you try to git push from your codespace terminal, you will notice there is no repository associated with it.
To save your work, create a new empty repository owned by @github and set your codespace to it by running:
git remote add origin git@github.com:github/YOUR_REPO_NAME.git
git branch -M main
git push -u origin main
Once you have a repository saved, you should finish the configuration under Deploying your prototype.
You don't need to develop locally, however. You can always keep building in the browser, just choose the Coodespaces tab under the Code button:

Create a repository for your prototype by clicking Use this template > Create a new repository
Set the repository Owner as github so that the deployment is only enabled for Hubbers. Choose whatever name you want.
Clone your new repo locally
You need to have nodejs installed on your machine. If you don't, head here and choose macOS installer.
Once you have the repository cloned on your machine, open the folder on VSCode or the terminal and run:
npm install
npm run dev
You will see the site running on http://localhost:1234
You need to change a few settings on GitHub.com for your prototype to be deployed & visible. This cannot be automated at the moment unfortunately!



/pages folder and rename it to whatever.jsx. Now head to localhost:1234/whatever and you will see your new page loadednpm: command not foundIf you try to run npm install and get an error similar to the one described above, that means you don't have Node/npm installed on your machine. In that case, head here to download it. Choose macOS installer for the simplest option.
Please open an issue or send a message on #primer in Slack (staff only). This repository is built to be a simple prototyping experience for designers and other non-developers. If it doesn't work out of the box, the template is wrong, not you -- please reach and the Primer team will help!
JavaScript
45.0%
HTML
26.3%
CSS
22.1%
Dockerfile
4.4%
TypeScript
2.3%