Configuration

Every aspect of the editor is driven by a single config object passed to <ImageEditor> or <ImageEditorModal>. This page is the top-level reference — each tool has its own guide with the full option tables.

Overview

Pass a config prop to customize behavior. Every field is optional.

<ImageEditor
  src="/photo.jpg"
  config={{
    tools: ["crop", "adjust", "filter", "text", "shapes"],
    defaultTool: "crop",
    export: {
      formats: ["png", "jpeg", "webp"],
      defaultFormat: "png",
      quality: 0.92,
    },
  }}
  onSave={handleSave}
/>

ImageEditorConfig

OptionTypeDefaultDescription
toolsImageEditorToolId[]allTools to show, in order. See Customize the Toolbar.
defaultToolImageEditorToolId | nullnullTool activated on load.
themeThemeConfig{ preset: "dark" }Colors, radius, and font. See Theming.
colorsstring[]built-insSwatch palette (hex) shared by every color picker.
cropCropToolConfigCrop Tool options.
adjustAdjustToolConfigAdjust Tool options.
filterFilterToolConfigFilter Tool options.
textTextToolConfigText Tool options.
shapesShapesToolConfigShapes Tool options.
imageImageToolConfigImage upload limits.
uiUIConfigChrome and sidebar options (below).
exportExportConfigOutput formats and save behavior. See Export & Save.
customToolsCustomTool[]Register your own tools. See Add a Custom Tool.
localestring"en"Active locale. See Localize the UI.
translationsRecord<string, string>Override individual translation strings.
translateFn(key: string) => stringCustom lookup, called instead of the built-in dictionary.

Available tools

ToolIDDescription
Crop"crop"Crop, rotate, flip, resize with presets
Adjust"adjust"Brightness, contrast, saturation, etc.
Filter"filter"Instagram-style photo filters
Text"text"Rich text annotations with fonts
Shapes"shapes"Rectangles, circles, lines, arrows
Image"image"Image overlay annotations

Export

config.export controls the save step. Full walkthrough in Export & Save.

OptionTypeDefaultDescription
formats("png" | "jpeg" | "webp")[]allFormats offered in the export dialog.
defaultFormat"png" | "jpeg" | "webp"firstPre-selected format.
qualitynumber0.92Encoder quality (0–1) for lossy formats.
closeAfterSavebooleanfalseCall onClose after a successful export.
filenamestringderivedBase filename for the built-in download.

UI

config.ui tunes the editor chrome. See Customize the Toolbar and Customize the Chrome.

OptionTypeDefaultDescription
toolSidebar.compactbooleanfalseCollapse the tool rail to icons only.
toolSidebar.groupSeparatorsbooleantrueDividers between tool groups.
titlestringTitle shown in the topbar.
showTitlebooleanToggle the topbar title.
showCloseButtonbooleanautoShow the close (X) button.
showBackButtonbooleanfalseUse a back arrow instead of X.
unsavedChangesWarningbooleantrueConfirm before closing with unsaved changes.

Next steps