Hacktoberfest: contribute to Sandpack Themes
See original GitHub issueIssue Description
We’re open to supporting new Sandpack themes because our key goal is empowering developers to include custom live coding experiences over the web, regardless of your website layout or level of design expertise. That’s why we provide plenty of options under @codesandbox/sandpack-themes
, and we want to offer even more options. So, how can you contribute to new themes?
Sandpack Theme Builder
Sandpack provides a tool to guide you in creating your custom theme. Start with a dark or light theme, and then add your custom values like primary and secondary colors.
Plus, if you want to give an even more personal touch, you can go to the Advanced tab and set colors for the syntax highlight and other cases.
https://sandpack.codesandbox.io/theme
Publish a theme
At this point, you need to go to the Sandpack repository, fork, and introduce some changes in your pull request. BTW, you can just use CodeSandbox Projects to do that:
- Open the Sandpack repository on CodeSandbox Projects;
- Create a contribution branch, which will fork the repository for you:

- Create a new file in codesandbox/sandpack/sandpack-themes/src folder with following file
[theme name].ts
- The content of this file must be an export for an object that contains the theme:
import type { SandpackTheme } from "./types";
export const THEME_NAME: SandpackTheme = {
colors: {
...
},
syntax: {
...
},
font: {
...
},
};
- Include your new theme into the
index.ts
file, that exposes all themes.
Still not clear? Feel free to contact us on Discord or on GitHub.
Issue Analytics
- State:
- Created 5 months ago
- Reactions:3
- Comments:8 (8 by maintainers)
Hi I would like to give this a try.
Hello @danilowoz, I have added some new themes as well please review 😃