Minimal, heavily-commented FormKit theme template. Use this as a starting point for creating custom themes.
Unlike theme-regenesis (fully styled), this package is:
- Educational - extensive comments explaining every decision
- Minimal - bare-bones styles, many empty sections
- Template - meant to be copied and customized
Users scaffold via: npx formkit create-theme MyThemeName
src/
├── theme.ts # Main theme definition with detailed comments
├── globals.ts # Global styles (commented explanations)
├── main.ts # Dev server entry
├── App.vue # Kitchen sink demo
├── style.css # Dev UI (red text = missing styles)
├── families/ # Family groupings with comments
│ ├── button.ts
│ ├── box.ts
│ ├── text.ts
│ └── dropdown.ts
└── inputs/ # Input definitions
├── [21 core]
├── pro/
└── addon/
| Aspect | theme-starter | theme-regenesis |
|---|---|---|
| Comments | 25-50+ per file | Minimal |
| Styling | Bare-bones | Fully styled |
| Purpose | Learning/template | Production use |
| Complexity | Simple | Complete |
variables: {
accentColor: 'blue', // String value
colorTemperature: 'neutral', // String value
inputMaxWidth: 'max-w-[20em]', // String value
radius: { // Editor control
editor: 'radius',
value: 'rounded-md',
},
spacing: {
editor: 'spacing',
value: '2',
min: '1',
max: '4',
},
scale: {
editor: 'fontSize',
value: 'base',
},
}pnpm dev # Vite + theme editor
pnpm build # tsup → dist/
pnpm test # viteststyle.css sets --text-color: red - any red text indicates missing theme styles.
Files include detailed explanations:
- Why certain styles are needed
- Browser quirks (Safari flex, webkit color)
- Tailwind Forms plugin conflicts
- Mobile/touch device considerations
Look for ⚠️ CAUTION: blocks throughout.
npx formkit create-theme MyTheme- Read comments in
theme.tsandglobals.ts - Review family definitions
- Check individual inputs for section names
- Variables - Modify in
theme.ts - Globals - Base styles in
globals.ts - Families - Shared styles in
families/ - Inputs - Override in
inputs/
pnpm dev
# Red text = missing styles
# Toggle dark mode
# Test all inputs in kitchen sinkpnpm build
pnpm release # bumpp + publishSame as theme-regenesis: 21 core + 12 pro + 2 addon = 35 inputs
@formkit/theme-creator
↓ provides createTheme(), rootClasses()
theme-starter (this package)
↓ template for custom themes
├── User custom themes (copy & modify)
├── themes.formkit.com (available for preview)
└── CLI scaffolding target
Each section key in theme files corresponds to a FormKit section:
outer- outermost wrapperwrapper- inner wrapperlabel- input labelinner- input containerinput- actual input elementhelp- help textmessages- error messages
See FormKit docs for full section list per input type.
- Add to
variablesintheme.ts - Use
$variableNamein class strings - For editor UI, use object form with
editortype
If not using @formkit/pro:
- Remove
pro/directory - Remove pro imports from
theme.ts - Remove from
meta.supportedInputs