Visual Editor
VS Code Theme Builder
Craft a custom editor theme and export it as a VS Code extension
§ 01 — Name
001 / 003
Theme Name
Installs as
my-custom-theme
· default
§ 02 — Editor
002 / 003
suggestions
custom
Dark
Catppuccin Mocha
Light
GitHub Light
Fancy
Tokyo Night
Generate theme
Live Preview
Editor.tsx — project
Explorer
▾
PROJECT
▸
src
▸
components
·
Editor.tsx
·
Preview.tsx
·
ColorField.tsx
▸
lib
·
presets.ts
·
utils.ts
▸
types
·
theme.ts
▸
app
·
page.tsx
·
layout.tsx
TS
Editor.tsx
×
TS
Preview.tsx
×
MD
README.md
×
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import
{ useState, useEffect }
from
'react'
;
import
type
{ FC }
from
'react'
;
interface
Props
{
theme
:
ThemeColors
;
onUpdate
: (key:
string
, val:
string
) =>
void
;
}
const
Editor
: FC<
Props
> = ({ theme }) => {
const
[open, setOpen]
=
useState
(
false
);
// apply colors from theme state
useEffect
(() => {
document
.title =
'Theme Builder'
;
}, []);
return
(
<div
className
=
"editor"
>
<Preview
theme
={theme} />
</div>
);
};
Terminal
Problems
Output
~/project
$
npm run dev
▶ next dev
- ready on http://localhost:3000
⎇ main
✓ 0
⚠ 0
TypeScript
UTF-8
Ln 10, Col 28