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
| Property | Type | Default value | Description | Defined in |
|---|---|---|---|---|
stageWidth? | number | 900 | Canvas width in pixels. Scope view | types/src/options.ts:198 |
stageHeight? | number | 600 | Canvas height in pixels. Scope view | types/src/options.ts:200 |
responsive? | boolean | true | Enable responsive canvas scaling. Scope global | types/src/options.ts:202 |
allowTouchScrolling? | boolean | true | Allow 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 global | types/src/options.ts:209 |
editorMode? | boolean | false | Enable editor mode (helper box with element properties). Scope global | types/src/options.ts:213 |
keyboardControl? | boolean | true | Enable keyboard controls (arrows to move, backspace to delete). Scope global | types/src/options.ts:215 |
inCanvasTextEditing? | boolean | true | Allow double-click to edit text in canvas. Scope global | types/src/options.ts:217 |
multiSelection? | boolean | false | Allow selecting multiple elements. Scope global | types/src/options.ts:219 |
multiSelectionColor? | string | '#54dfe6' | Border color for multi-selection. Scope global | types/src/options.ts:221 |
selectedColor? | string | '#7B61FF' | Border color of selected element. Scope global | types/src/options.ts:225 |
boundingBoxColor? | string | '#2185d0' | Border color of bounding box. Scope global | types/src/options.ts:227 |
cornerIconColor? | string | '#000000' | Color for corner icon controls. Scope global | types/src/options.ts:229 |
cornerControlsStyle? | ControlsStyle | 'advanced' | Corner controls style preset. Scope global | types/src/options.ts:231 |
highlightEditableObjects? | string | '' | Highlight editable objects with dashed border (hex color or empty). Scope global | types/src/options.ts:233 |
fonts? | FontDefinition[] | [{name: 'Arial'}, {name: 'Lobster', url: 'google'}] | Available fonts. Scope global | types/src/options.ts:237 |
mainBarModules? | ModuleItem[] | undefined | Modules shown in the main bar. Scope global | types/src/options.ts:241 |
disabledModules? | string[] | [] | Modules disabled for the current view/print area. Uses same IDs as mainBarModules. Scope view | types/src/options.ts:243 |
initialActiveModule? | string | '' | Initially active module. Scope global | types/src/options.ts:245 |
toolbar? | CVToolbarConfig | undefined | Element toolbar configuration. Scope global | types/src/options.ts:247 |
modalMode? | string | false | false | CSS selector for modal mode trigger element. Scope global | types/src/options.ts:249 |
viewThumbnailsWrapper? | string | '' | CSS selector for view thumbnails wrapper. Scope global | types/src/options.ts:252 |
downloadFilename? | string | 'Product' | Filename for downloaded product images. Scope global | types/src/options.ts:256 |
multiImageUpload? | boolean | false | When 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 global | types/src/options.ts:263 |
layouts? | string | CVLayoutItem[] | [] | Layout templates that replace view elements. Array or URL to JSON. Scope view | types/src/options.ts:267 |
replaceInitialElements? | boolean | false | Only replace initial elements on product change. Scope global | types/src/options.ts:269 |
optionalView? | boolean | false | Make view optional (user must unlock). Scope view | types/src/options.ts:271 |
enableDynamicViews? | boolean | false | Allow user to add/remove/duplicate views. Scope global | types/src/options.ts:273 |
dynamicViewsOptions? | DynamicViewsOptions | undefined | Options for the dynamic views module. Scope view | types/src/options.ts:275 |
printingBox? | PrintingBox | null | null | Default printing box configuration. Scope view | types/src/options.ts:279 |
usePrintingBoxAsBounding? | boolean | false | Use printing box as bounding box when element has none. Scope view | types/src/options.ts:281 |
showBleedBox? | boolean | undefined | Show bleed box and crop marks on all print areas. Per-area showBleedBox takes precedence. Scope global | types/src/options.ts:283 |
watermark? | string | false | false | Watermark image URL for downloads/prints. Scope global | types/src/options.ts:285 |
priceFormat? | PriceFormat | undefined | Price display format. Scope global | types/src/options.ts:289 |
pricingRules? | PricingRuleGroup[] | [] | Pricing rules for dynamic price calculation. Scope view | types/src/options.ts:291 |
maxPrice? | number | -1 | Maximum allowed price (-1 = no limit). Scope printArea | types/src/options.ts:293 |
actions? | ActionsConfig | undefined | Top action bar layout. Scope global | types/src/options.ts:297 |
bottomActions? | ActionsConfig | undefined | Bottom bar layout. Scope global | types/src/options.ts:299 |
guidedTour? | Record<string, string> | null | null | Guided tour steps. Key = target selector, value = text. Scope global | types/src/options.ts:301 |
guidedTourAutoStart? | boolean | false | Auto-start the guided tour on first page load (respects localStorage dismissal). Scope global | types/src/options.ts:303 |
autoOpenInfo? | boolean | false | Open info modal on load. Scope global | types/src/options.ts:305 |
elementParameters? | Partial<ElementParameters> | undefined | Default parameters for all elements. Scope printArea | types/src/options.ts:309 |
textParameters? | Partial<TextParameters> | undefined | Default parameters for text elements. Scope printArea | types/src/options.ts:311 |
imageParameters? | Partial<ImageParameters> | undefined | Default parameters for image elements. Scope printArea | types/src/options.ts:313 |
customImageParameters? | Partial<CustomImageParameters> | undefined | Default parameters for user-uploaded images. Scope printArea | types/src/options.ts:315 |
customTextParameters? | Partial<TextParameters> | undefined | Default parameters for user-added text. Scope printArea | types/src/options.ts:317 |
qrCodeProps? | Partial<ElementParameters> | undefined | Default parameters for QR codes. Scope global | types/src/options.ts:319 |
hexNames? | Record<string, string> | undefined | Custom hex color names. Key = hex (no #), value = name. Scope global | types/src/options.ts:322 |
colorPickerPalette? | string[] | [] | Color palette for the color picker. Scope global | types/src/options.ts:324 |
labels? | Partial<ChamevoLabels> | undefined | UI label overrides. Merges over English defaults. Scope global | types/src/options.ts:326 |
langJSON? | string | Record<string, string> | undefined | Deprecated Use labels instead. Language JSON or URL to language file. Scope global | types/src/options.ts:328 |
snapGridSize? | [number, number] | [50, 50] | Snap grid size [x, y]. Scope global | types/src/options.ts:330 |
textLinkGroupProps? | string[] | [] | Properties synced across textLinkGroup elements. Scope global | types/src/options.ts:332 |
replaceColorsInColorGroup? | boolean | false | Replace colors in color group when new element added. Scope view | types/src/options.ts:336 |
applyFillWhenReplacing? | boolean | true | Apply fill from replaced element to new element. Scope view | types/src/options.ts:338 |
applySizeWhenReplacing? | boolean | false | Apply size from replaced element to new element. Scope view | types/src/options.ts:340 |
smartGuides? | boolean | true | Enable smart alignment guides. Scope global | types/src/options.ts:342 |
sizeTooltip? | boolean | false | Show size tooltip on selected images. Scope global | types/src/options.ts:344 |
customizationRequiredRule? | "any" | "all" | 'any' | Customization required rule: 'any' view or 'all' views. Scope global | types/src/options.ts:346 |
customTextAsTextbox? | boolean | false | Add custom text as textbox by default. Scope view | types/src/options.ts:348 |
unsavedProductAlert? | boolean | false | Show alert when leaving with unsaved changes. Scope global | types/src/options.ts:350 |
unitOfMeasurement? | RulerUnit | 'mm' | Unit of measurement for ruler and dynamic views. Scope global | types/src/options.ts:353 |
maxColorableSVGPaths? | number | 10 | Maximum 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 view | types/src/options.ts:362 |
imageProxyMaxDimension? | number | 1600 | Maximum 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 global | types/src/options.ts:374 |
aiService? | AIServiceConfig | undefined | AI service configuration. Scope global | types/src/options.ts:378 |
tryOn? | TryOnConfig | undefined | Virtual try-on configuration. Scope global | types/src/options.ts:382 |
industry? | object | undefined | Industry-specific behavior (e.g. 'engraving'). Scope view | types/src/options.ts:386 |
industry.type | string | null | undefined | - | types/src/options.ts:386 |
industry.opts | Record<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 global | types/src/options.ts:395 |
dynamicDesigns? | Record<string, DynamicDesignLibrary> | undefined | Named 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 global | types/src/options.ts:404 |
dragToCanvas? | boolean | true | Enable drag-and-drop of elements (texts, images, graphics) from module panels onto the canvas. When false, elements can only be added by clicking. Scope global | types/src/options.ts:414 |
debug? | boolean | false | Enable debug logging of critical events to the console. Scope global | types/src/options.ts:418 |
modulesConfig? | ChamevoModulesConfig | undefined | Per-module configuration grouped in one place. Modules read from currentOptions.modulesConfig[moduleKey], then fall back to the component-level config prop. Scope view | types/src/options.ts:428 |