Skip to main content

Interface: ChamevoOptions

Defined in: types/src/options.ts:195

ChamevoJS configuration options. All properties are optional — sensible defaults are applied.

Example

const options: ChamevoOptions = {
stageWidth: 900,
stageHeight: 600,
editorMode: false,
fonts: [{ name: 'Arial' }, { name: 'Lobster', url: 'google' }],
elementParameters: { draggable: true, resizable: true },
};

Properties

PropertyTypeDefault valueDescriptionDefined in
stageWidth?number900Canvas width in pixels. Scope viewtypes/src/options.ts:198
stageHeight?number600Canvas height in pixels. Scope viewtypes/src/options.ts:200
responsive?booleantrueEnable responsive canvas scaling. Scope globaltypes/src/options.ts:202
allowTouchScrolling?booleantrueAllow native page scrolling when a single-finger swipe starts over the canvas on touch devices. Movable elements are still dragged; non-movable elements and empty canvas areas let the page scroll. Scope globaltypes/src/options.ts:209
editorMode?booleanfalseEnable editor mode (helper box with element properties). Scope globaltypes/src/options.ts:213
keyboardControl?booleantrueEnable keyboard controls (arrows to move, backspace to delete). Scope globaltypes/src/options.ts:215
inCanvasTextEditing?booleantrueAllow double-click to edit text in canvas. Scope globaltypes/src/options.ts:217
multiSelection?booleanfalseAllow selecting multiple elements. Scope globaltypes/src/options.ts:219
multiSelectionColor?string'#54dfe6'Border color for multi-selection. Scope globaltypes/src/options.ts:221
selectedColor?string'#7B61FF'Border color of selected element. Scope globaltypes/src/options.ts:225
boundingBoxColor?string'#2185d0'Border color of bounding box. Scope globaltypes/src/options.ts:227
cornerIconColor?string'#000000'Color for corner icon controls. Scope globaltypes/src/options.ts:229
cornerControlsStyle?ControlsStyle'advanced'Corner controls style preset. Scope globaltypes/src/options.ts:231
highlightEditableObjects?string''Highlight editable objects with dashed border (hex color or empty). Scope globaltypes/src/options.ts:233
fonts?FontDefinition[][{name: 'Arial'}, {name: 'Lobster', url: 'google'}]Available fonts. Scope globaltypes/src/options.ts:237
mainBarModules?ModuleItem[]undefinedModules shown in the main bar. Scope globaltypes/src/options.ts:241
disabledModules?string[][]Modules disabled for the current view/print area. Uses same IDs as mainBarModules. Scope viewtypes/src/options.ts:243
initialActiveModule?string''Initially active module. Scope globaltypes/src/options.ts:245
toolbar?CVToolbarConfigundefinedElement toolbar configuration. Scope globaltypes/src/options.ts:247
modalMode?string | falsefalseCSS selector for modal mode trigger element. Scope globaltypes/src/options.ts:249
viewThumbnailsWrapper?string''CSS selector for view thumbnails wrapper. Scope globaltypes/src/options.ts:252
downloadFilename?string'Product'Filename for downloaded product images. Scope globaltypes/src/options.ts:256
multiImageUpload?booleanfalseWhen true, uploading multiple images at once distributes them across the visible print areas in order (first image → first area, second → second, …). Extra images beyond the number of print areas fall back to the current area. Scope globaltypes/src/options.ts:263
layouts?string | CVLayoutItem[][]Layout templates that replace view elements. Array or URL to JSON. Scope viewtypes/src/options.ts:267
replaceInitialElements?booleanfalseOnly replace initial elements on product change. Scope globaltypes/src/options.ts:269
optionalView?booleanfalseMake view optional (user must unlock). Scope viewtypes/src/options.ts:271
enableDynamicViews?booleanfalseAllow user to add/remove/duplicate views. Scope globaltypes/src/options.ts:273
dynamicViewsOptions?DynamicViewsOptionsundefinedOptions for the dynamic views module. Scope viewtypes/src/options.ts:275
printingBox?PrintingBox | nullnullDefault printing box configuration. Scope viewtypes/src/options.ts:279
usePrintingBoxAsBounding?booleanfalseUse printing box as bounding box when element has none. Scope viewtypes/src/options.ts:281
showBleedBox?booleanundefinedShow bleed box and crop marks on all print areas. Per-area showBleedBox takes precedence. Scope globaltypes/src/options.ts:283
watermark?string | falsefalseWatermark image URL for downloads/prints. Scope globaltypes/src/options.ts:285
priceFormat?PriceFormatundefinedPrice display format. Scope globaltypes/src/options.ts:289
pricingRules?PricingRuleGroup[][]Pricing rules for dynamic price calculation. Scope viewtypes/src/options.ts:291
maxPrice?number-1Maximum allowed price (-1 = no limit). Scope printAreatypes/src/options.ts:293
actions?ActionsConfigundefinedTop action bar layout. Scope globaltypes/src/options.ts:297
bottomActions?ActionsConfigundefinedBottom bar layout. Scope globaltypes/src/options.ts:299
guidedTour?Record<string, string> | nullnullGuided tour steps. Key = target selector, value = text. Scope globaltypes/src/options.ts:301
guidedTourAutoStart?booleanfalseAuto-start the guided tour on first page load (respects localStorage dismissal). Scope globaltypes/src/options.ts:303
autoOpenInfo?booleanfalseOpen info modal on load. Scope globaltypes/src/options.ts:305
elementParameters?Partial<ElementParameters>undefinedDefault parameters for all elements. Scope printAreatypes/src/options.ts:309
textParameters?Partial<TextParameters>undefinedDefault parameters for text elements. Scope printAreatypes/src/options.ts:311
imageParameters?Partial<ImageParameters>undefinedDefault parameters for image elements. Scope printAreatypes/src/options.ts:313
customImageParameters?Partial<CustomImageParameters>undefinedDefault parameters for user-uploaded images. Scope printAreatypes/src/options.ts:315
customTextParameters?Partial<TextParameters>undefinedDefault parameters for user-added text. Scope printAreatypes/src/options.ts:317
qrCodeProps?Partial<ElementParameters>undefinedDefault parameters for QR codes. Scope globaltypes/src/options.ts:319
hexNames?Record<string, string>undefinedCustom hex color names. Key = hex (no #), value = name. Scope globaltypes/src/options.ts:322
colorPickerPalette?string[][]Color palette for the color picker. Scope globaltypes/src/options.ts:324
labels?Partial<ChamevoLabels>undefinedUI label overrides. Merges over English defaults. Scope globaltypes/src/options.ts:326
langJSON?string | Record<string, string>undefinedDeprecated Use labels instead. Language JSON or URL to language file. Scope globaltypes/src/options.ts:328
snapGridSize?[number, number][50, 50]Snap grid size [x, y]. Scope globaltypes/src/options.ts:330
textLinkGroupProps?string[][]Properties synced across textLinkGroup elements. Scope globaltypes/src/options.ts:332
replaceColorsInColorGroup?booleanfalseReplace colors in color group when new element added. Scope viewtypes/src/options.ts:336
applyFillWhenReplacing?booleantrueApply fill from replaced element to new element. Scope viewtypes/src/options.ts:338
applySizeWhenReplacing?booleanfalseApply size from replaced element to new element. Scope viewtypes/src/options.ts:340
smartGuides?booleantrueEnable smart alignment guides. Scope globaltypes/src/options.ts:342
sizeTooltip?booleanfalseShow size tooltip on selected images. Scope globaltypes/src/options.ts:344
customizationRequiredRule?"any" | "all"'any'Customization required rule: 'any' view or 'all' views. Scope globaltypes/src/options.ts:346
customTextAsTextbox?booleanfalseAdd custom text as textbox by default. Scope viewtypes/src/options.ts:348
unsavedProductAlert?booleanfalseShow alert when leaving with unsaved changes. Scope globaltypes/src/options.ts:350
unitOfMeasurement?RulerUnit'mm'Unit of measurement for ruler and dynamic views. Scope globaltypes/src/options.ts:353
maxColorableSVGPaths?number10Maximum number of paths in a multi-path SVG for per-path color editing. SVGs with more paths than this threshold will have colorization disabled. Set to 0 to disable the limit. Scope viewtypes/src/options.ts:362
imageProxyMaxDimension?number1600Maximum pixel dimension (width or height) for raster images rendered on canvas. Images whose natural dimension exceeds this value (with 1.25× slack) are downscaled to an in-memory proxy for editing; the original full-resolution source is preserved for print export. Larger values = better on-screen quality but more memory usage. Set to 0 to disable proxying (always render originals). Scope globaltypes/src/options.ts:374
aiService?AIServiceConfigundefinedAI service configuration. Scope globaltypes/src/options.ts:378
tryOn?TryOnConfigundefinedVirtual try-on configuration. Scope globaltypes/src/options.ts:382
industry?objectundefinedIndustry-specific behavior (e.g. 'engraving'). Scope viewtypes/src/options.ts:386
industry.typestring | nullundefined-types/src/options.ts:386
industry.optsRecord<string, unknown>undefined-types/src/options.ts:386
patterns?string[][]Global pattern image URLs available for text and SVG fills. Elements with their own patterns array take priority over this list. Scope globaltypes/src/options.ts:395
dynamicDesigns?Record<string, DynamicDesignLibrary>undefinedNamed design libraries. Keys become module IDs when prefixed with designs_ (e.g. key "clipart" → module ID "designs_clipart"). Each library renders as a separate mainbar nav item using cv-module-graphics. Scope globaltypes/src/options.ts:404
dragToCanvas?booleantrueEnable drag-and-drop of elements (texts, images, graphics) from module panels onto the canvas. When false, elements can only be added by clicking. Scope globaltypes/src/options.ts:414
debug?booleanfalseEnable debug logging of critical events to the console. Scope globaltypes/src/options.ts:418
modulesConfig?ChamevoModulesConfigundefinedPer-module configuration grouped in one place. Modules read from currentOptions.modulesConfig[moduleKey], then fall back to the component-level config prop. Scope viewtypes/src/options.ts:428