VVibeFlui

Theme Config

theme config controls class slots, variants, color mode, and dynamic class resolution.

Schema shape

TS
export const usersSchema = {
  resource: "users",
  theme: {
    preset: "default",
    engine: "tailwind",
    colorMode: "inherit",
    classNameMergeStrategy: "merge",
    classNames: {
      tableWrapper: "shadow-sm",
      tableRow: "transition-colors"
    },
    variants: {
      actionButton: {
        primary: "bg-blue-600 text-white hover:bg-blue-700"
      }
    },
    classNameWhen: [
      {
        slot: "tableRow",
        when: { key: "status", operator: "equals", value: "suspended" },
        className: "bg-red-50 hover:bg-red-50"
      }
    ],
    classNameResolver: "theme.resolveClassName"
  }
} as const;

Properties

PropertyTypePurpose
preset"default" | "tailadmin" | "shadcn" | "custom"Base class preset.
engine"tailwind"Supported theme engine.
colorMode"inherit" | "light" | "dark"Root color mode behavior.
classNameMergeStrategy"merge" | "override"How schema classes combine with preset classes.
classNamesobjectSlot class overrides or additions.
variantsobjectVariant classes used by action buttons.
classNameWhenarrayConditional classes by slot and condition.
classNameResolverstringRegistry class name resolver key.

Defaults

When omitted, theme normalization resolves:

  • preset from theme.preset, or from the root adapter, or default.
  • engine to tailwind.
  • colorMode to inherit.
  • classNameMergeStrategy to merge.