The official reference theme for FormKit. A fully-styled, production-ready theme demonstrating best practices for FormKit theming with Tailwind CSS.
src/
├── theme.ts # Main theme definition (createTheme call)
├── globals.ts # Global styles for all inputs
├── main.ts # Dev server entry point
├── App.vue # Kitchen sink demo
├── style.css # Dev UI variables
├── families/ # Shared style groups
│ ├── button.ts # button, submit
│ ├── box.ts # checkbox, radio
│ ├── text.ts # text, email, number, date...
│ └── dropdown.ts # autocomplete, dropdown, taglist
└── inputs/ # Input-specific styles
├── [21 core inputs]
├── pro/ # 12 premium inputs
└── addon/ # barcode, multi-step
| Variable | Editor | Default | Description |
|---|---|---|---|
radius |
radius | rounded-md | Border radius |
accentColor |
color | blue | Primary accent |
colorTemperature |
color | neutral | Gray palette |
spacing |
spacing | 2 | Base spacing unit |
scale |
fontSize | base | Text scale |
inputShadow |
shadow | shadow-sm | Input shadows |
baseColorShade |
buttons | 600 | Color intensity |
borderShadeLightMode |
buttons | 400 | Light borders |
borderShadeDarkMode |
buttons | 500 | Dark borders |
Advanced variables: inputMaxWidth, tagRadius, swatchRadius
__globals (globals.ts)
↓ base styles for all inputs
family:text/box/button/dropdown
↓ shared styles for input groups
input-specific (inputs/*.ts)
↓ final overrides
Core (21): button, checkbox, color, date, datetime-local, email, file, form, month, number, password, radio, range, search, select, submit, tel, text, textarea, time, url, week
Pro (12): autocomplete, colorpicker, datepicker, dropdown, mask, rating, repeater, slider, taglist, toggle, togglebuttons, transferlist
Addon (2): barcode, multi-step
pnpm dev # Vite dev server with theme editor
pnpm build # tsup → dist/theme.{js,cjs,d.ts}
pnpm test # vitestDev server uses:
@formkit/theme-editorfor live variable editingFormKitKitchenSinkfor all-inputs demo- Tailwind CDN for instant class updates
// Simple substitution
input: 'p-$spacing rounded-$radius'
// With scale shifting
outer: 'mb-$spacing(-2)' // -2 from current value
// Color with shade
border: 'border-$accentColor-$baseColorShade'
// Dark mode variant
text: 'text-$colorTemperature-700 dark:text-$colorTemperature-300'Most inputs export empty objects and inherit from families:
// text.ts - inherits everything from family:text
export default {}Override specific sections as needed:
// checkbox.ts - only override decorator
export default {
decorator: '$radius(0,rounded-none,rounded-sm)',
}@formkit/theme-creator
↓ provides createTheme(), rootClasses()
theme-regenesis (this package)
↓ exports theme function
├── themes.formkit.com (displays/edits theme)
├── theme-editor (previews with this theme)
└── User projects (import and use)
dist/theme.js- ESMdist/theme.cjs- CommonJSdist/theme.d.ts- TypeScript declarations
External dependency: @formkit/theme-creator (not bundled)
- Create
src/inputs/[name].tsorsrc/inputs/pro/[name].ts - Export section classes (or empty object for family inheritance)
- Import and add to
inputsobject intheme.ts - Add to
meta.supportedInputsarray
Edit the appropriate file in src/families/:
- Changes apply to all inputs in that family
- Individual inputs can still override
- Run
pnpm dev - Theme editor appears in corner
- Adjust variables to test different configurations
- All inputs visible in FormKitKitchenSink