CustomTheme
Defined in: src/types/index.ts:365
A colour/typography theme for diagram rendering.
Every field is optional. Whatever is omitted comes from the built-in theme named
by base ('light' unless set), so a theme that only changes fontSize, or one
state type’s fill, is a one-line object. A fully specified theme still works as
before.
Example
Section titled “Example”const bigDark: CustomTheme = { base: 'dark', fontSize: 18 };const greenTasks: CustomTheme = { nodeColors: { Task: { fill: '#e8f5e9' } } };Properties
Section titled “Properties”background?
Section titled “background?”optional background?: string;Defined in: src/types/index.ts:366
optional base?: "light" | "dark";Defined in: src/types/index.ts:368
Built-in theme the omitted fields are taken from. Defaults to 'light'.
edgeColors?
Section titled “edgeColors?”optional edgeColors?: Partial<{ choice: string; default: string; error: string; normal: string; retry?: string;}>;Defined in: src/types/index.ts:369
fontFamily?
Section titled “fontFamily?”optional fontFamily?: string;Defined in: src/types/index.ts:370
fontSize?
Section titled “fontSize?”optional fontSize?: number;Defined in: src/types/index.ts:371
nodeColors?
Section titled “nodeColors?”optional nodeColors?: Partial<Record<StateType, Partial<{ fill: string; stroke: string;}>>>;Defined in: src/types/index.ts:372
textColor?
Section titled “textColor?”optional textColor?: string;Defined in: src/types/index.ts:373