Skip to content

ChromaticProjectConfig

Defined in: cli/cli/src/config/config/config.type.ts:701

A single Chromatic project entry in a verification.visualRegression task’s chromatic-projects config. Each entry produces one matrix job in CI, publishing to a separate Chromatic project.

The tokenName maps to a repository secret named CHROMATIC_PROJECT_TOKEN_<TOKENNAME>. Additional fields correspond to chromaui/action inputs and are passed through directly.

https://www.chromatic.com/docs/monorepos/

optional buildScript?: string

Defined in: cli/cli/src/config/config/config.type.ts:716

Script name to build Storybook. Defaults to "build:storybook". Must accept --output-dir pass-through (use turbo run … -- at root).


optional exitZeroOnChanges?: boolean

Defined in: cli/cli/src/config/config/config.type.ts:741

Exit with code 0 even when visual changes are detected. Useful during initial setup before baselines are approved. Corresponds to --exit-zero-on-changes.


optional onlyStoryFiles?: string

Defined in: cli/cli/src/config/config/config.type.ts:735

Glob patterns matching story files to snapshot. When set, only matching stories are captured. Corresponds to --only-story-files. Cannot be combined with onlyStoryNames.


optional storybookBaseDir?: string

Defined in: cli/cli/src/config/config/config.type.ts:722

Path to the Storybook folder relative to workingDir, for TurboSnap. Tells Chromatic where to find .storybook/ when the Storybook config is in a subdirectory. Corresponds to --storybook-base-dir.


tokenName: string

Defined in: cli/cli/src/config/config/config.type.ts:706

Secret suffix. The CI job reads CHROMATIC_PROJECT_TOKEN_<tokenName>. Must be uppercase (e.g. "WEB", "UI").


optional untraced?: string | string[]

Defined in: cli/cli/src/config/config/config.type.ts:729

Glob patterns of files/dirs that should NOT trigger a TurboSnap bailout when changed. Useful for ignoring non-UI changes in a monorepo (e.g. "./packages/!(ui)/**" to focus TurboSnap on the UI package). Corresponds to --untraced. Accepts a single glob string or array.


workingDir: string

Defined in: cli/cli/src/config/config/config.type.ts:711

Path to run the Chromatic build from, relative to the repo root. Typically the package directory (e.g. "apps/web", "packages/ui").