Themes

FormForge ships with three built-in themes, each built on a token system.

Usage

<FormForge schema={schema} theme="modern" />
<FormForge schema={schema} theme="minimal" />
<FormForge schema={schema} theme="enterprise" />

Built-in themes

ThemeStyle
modernIndigo accents, rounded corners, subtle shadows
minimalBlack accents, sharp focus rings, no shadows
enterpriseTeal accents, professional, dense layout

Token structure

interface ThemeTokens {
  colors: {
    primary, primaryHover,
    background, surface,
    border, borderFocus,
    text, textMuted, textPlaceholder,
    error, errorBackground, success,
  }
  radii:   { sm, md, lg }
  spacing: { xs, sm, md, lg, xl }
  font:    { family, sizeBase, sizeSm, weightNormal, weightMedium }
  shadow:  { sm, focus }
}

Custom theme

import type { ThemeTokens } from '@formforges/themes'
import { modernTokens } from '@formforges/themes'

const myTheme: ThemeTokens = {
  ...modernTokens,
  colors: {
    ...modernTokens.colors,
    primary: '#f59e0b',       // amber
    primaryHover: '#d97706',
    borderFocus: '#f59e0b',
  },
}